warren at warrensweb.us
Tue Feb 23 04:21:10 CET 2016
On 02/21/2016 01:34 PM, Graham Samuel 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
For future reference, anyone needing this and running on a Linux server
put shell("date -u")
which will return the current UTC time without any local timezone
More information about the use-livecode