Problem with converting time

Richard Gaskin ambassador at
Thu Mar 16 16:05:06 EDT 2017

Michael Doub wrote:

 > I am getting different answers based on environment when trying to
 > convert EPOC seconds to dateitems or internet date.   On my mac I get
 > the expected result but on a HostM server I get something totally
 > different.

How different?

 > Does any one have a conversion function that does not use the
 > livecode's convert function that they would be willing to share?

The seconds are usually a very good choice for their compactness and 
ease of calculation, and more so because the value we get is in GMT 
based on the offset from host OS.

What this should mean is that you can convert values obtained from "the 
seconds" and get a good date/time regardless of which time zone you're in.

So seconds are usually ideal (along with "internet date") for network 
applications such as the one you're working on.

But for the conversion to take your local system into account, you'll 
need to do the conversion locally.

If you're doing the conversion on the server, the date/time will reflect 
the time zone settings in the server OS.

  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  Ambassador at      

More information about the use-livecode mailing list