Finding UTC

-hh hh at livecode.org
Sun Feb 21 15:45:02 EST 2016


> Graham S. wrote
> Thanks to all those who replied - ‘the internet date’ was the
> answer I needed, since I then didn’t have to get out of my
> LiveCode comfort zone to do the calculation. I’m thinking of
> time-stamping some interactions that are going to go through
> a program I’m running on LiveCode Server. Right now I have it
> running on DreamHost, whose servers presumably stay in one
> place, but I wanted an invariant time stamp not depending on
> the location of the server or of any particular user, so I
> saw UTC as the way to go. My issue was that I didn’t know of
> a command that I could run on the server, or a url to a public
> time server, that would just give me UTC in its simplest form
> without leaving LiveCode - probably very lazy of me, but I want
> to keep things as simple as I can. I have now written a little
> homegrown routine that uses ‘the internet date’ which seems to
> work fine. Thanks again Graham

One remark to the internet date (which is the date format I
always use and then convert to dateItems if needed for
calculations).

If using recent or future dates one should have in mind that
"the internet date" respects **daylight saving offsets** of
the dates.

You can see that with a HTML5 standalone
http://hh-onrev.com/html5/countUpOrDown-8.0.0-dp-9X.html
that counts up to the LC meeting. Click at the bottom field
to change the date from August to March and you(?) will see
the UTC offset changing by -1 hour.
[Use Safari, Chrome or Opera.
Currently NOT Firefox (v45, again with v46)]

hh



More information about the Use-livecode mailing list