Working with seconds, what am I missing?

Andrew Henshaw henshaw at me.com
Sun Apr 22 16:55:28 EDT 2012


Trying to work with seconds to avoid format issues with dates in different countries I keep running into this issue,  and im probably just missing something very obvious!

Using the following simple code today (the 22nd April)..

   put the date into tDate
   convert tDate to seconds
   put tDate

Returns 1335049200

Id expect to get a result of 22nd April,  but instead Ive fed that in to a few online UNIX time converters and they all return Sat, 21 Apr 2012 23:00:00 GMT which is an hour into the previous day.

Im assuming its something to do with GMT / daylight savings time,  but is there a reliable way to get and use the seconds.  Id like to ensure the values stored are correct.

Andy



More information about the use-livecode mailing list