timezone assumption when importing timestamps

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
demiadirac
Addicted to Bruji
Addicted to Bruji
Posts: 40
Joined: Sat Jun 14, 2014 5:32 am

timezone assumption when importing timestamps

Post by demiadirac »

When importing a csv file containing datetime strings in format "YYYY-MM-DD HH:MI:SS" into a timestamp field of bookpedia ( e.g one of the custom dates), what timezone is used? UTC?
Waldbaer
Addicted to Bruji
Addicted to Bruji
Posts: 109
Joined: Wed Sep 05, 2012 6:23 pm

Re: timezone assumption when importing timestamps

Post by Waldbaer »

Ermh, I'm not sure if I understand you correctly, but it looks to me as if "YYYY-MM-DD HH:MM:SS" does not have any timezone connection and should be imported without any changes, since it isn't any absolute time. Do any changes of the values occur after the import?
demiadirac
Addicted to Bruji
Addicted to Bruji
Posts: 40
Joined: Sat Jun 14, 2014 5:32 am

Re: timezone assumption when importing timestamps

Post by demiadirac »

The import function converts the string to an integer: the apple epoch time, which is by definition utc. This convention is also used by the gui for reconverting to human readable format for display.
Waldbaer
Addicted to Bruji
Addicted to Bruji
Posts: 109
Joined: Wed Sep 05, 2012 6:23 pm

Re: timezone assumption when importing timestamps

Post by Waldbaer »

Ah OK, so you know more about the internals of dvdpedia than me. Anyways, if you are right, it will be easy to find the answer to your question by importing a (small) test.csv and just checking manually if the result is as you want it, and if not, use a calc-application like Numbers or LibreOffice Calc to add/substract the number of hours before importing as you want it to.

PS: The pedias only offer date instead of datetime fields, so the only problem might be +/- 1 day, and only if there is one other conversion included (e.g. to the local user's time zone, but not to UTC before), am I right? I still wonder where you ran into a real user problem with that, maybe you could explain this problem? Other users (like me) might be able to help you better then, since they know how to use dvdpedia to their needs (which might be similar to yours) without caring how it works, as long as it does what is expected. :wink:
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: timezone assumption when importing timestamps

Post by Conor »

The Apple defaults are on for the time zone settings. Which means your computer time zone settings are used so that the time you enter is the time at your time zone and not at UTC.

That said DVDpedia does round off to the beginning of the day in many functions, such as the smart collections.
demiadirac
Addicted to Bruji
Addicted to Bruji
Posts: 40
Joined: Sat Jun 14, 2014 5:32 am

Re: timezone assumption when importing timestamps

Post by demiadirac »

I understand.
Thanks, Conor!
Post Reply