timezone assumption when importing timestamps

Any trouble you encounter with the Pedias, here's the place to ask for help.

timezone assumption when importing timestamps

Postby demiadirac » Fri Oct 23, 2015 2:28 pm

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?
demiadirac
Addicted to Bruji
Addicted to Bruji
 
Posts: 27
Joined: Sat Jun 14, 2014 5:32 am

Re: timezone assumption when importing timestamps

Postby Waldbaer » Sat Oct 24, 2015 6:15 pm

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?
Waldbaer
Addicted to Bruji
Addicted to Bruji
 
Posts: 106
Joined: Wed Sep 05, 2012 6:23 pm

Re: timezone assumption when importing timestamps

Postby demiadirac » Sun Oct 25, 2015 12:49 am

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.
demiadirac
Addicted to Bruji
Addicted to Bruji
 
Posts: 27
Joined: Sat Jun 14, 2014 5:32 am

Re: timezone assumption when importing timestamps

Postby Waldbaer » Sun Oct 25, 2015 5:52 am

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:
Waldbaer
Addicted to Bruji
Addicted to Bruji
 
Posts: 106
Joined: Wed Sep 05, 2012 6:23 pm

Re: timezone assumption when importing timestamps

Postby Conor » Sun Oct 25, 2015 6:24 am

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.
User avatar
Conor
Top Dog
 
Posts: 5238
Joined: Sat Jul 03, 2004 12:58 pm

Re: timezone assumption when importing timestamps

Postby demiadirac » Mon Oct 26, 2015 1:29 pm

I understand.
Thanks, Conor!
demiadirac
Addicted to Bruji
Addicted to Bruji
 
Posts: 27
Joined: Sat Jun 14, 2014 5:32 am


Return to Support

cron