Finding UTC

Sannyasin Brahmanathaswami brahma at
Sat Feb 20 14:09:51 EST 2016

On February 20, 2016 at 6:50:55 AM, Earthednet-wp (prothero at<mailto:prothero at>) wrote:
 This will of course put the time as perceived by the server where in the world my copy of LCS happens to be hosted. Given that this is arbitrary from the point of view of a user of the server, it would be easier for me if I could show the time as UTC, or what us Brits used to call Greenwich Mean Time.

I may be missing thing, but unless your server is a nomad, it is always exactly X numbers away from UTC...  sothen what is the issue?

Forgive me if I'm stating the obvious and don't grasp your problem:

 UTC is UTC wherever you are.  If I query for UTC in Hawaii, or California or London, we get the same value...So all you need is a small API script on the server to return UTC to you... and typically you have control over the time setting on your "box"  so if you want the server to return have to be sure (unix/linux) tzdata(cmd line app) is installed.. run that and you will be prompted to set your time zone. set "GST-0"  and you are good to go.

This assumes of course that's what you may not be... I prefer, e.g. that the server return the time of the place where it lives (otherwise I get crazy confused)... this is, as you say, arbitrary, since we have users all over the planet in all time zones... but though I am in Hawaii, I like the server in California to be on California time... as this is how we think out here in the middle of the Pacific...CA is three hours ahead, Texas is 4, Chicago 5, NY 6  etc.. (depends on DLS)  if I want my LCS on the server to return UTC, then I just add the offset to PST  (+8) since he lives in Californai and is not moving around.

if you do not have control of the server box/instance then you only have the option to add the offset to GMT to the server time... a simple "add" in your script...  Through the years, in my experience, default installations of web server OS's often have some odd time default, and you only discover this one day when you see weird time stamps.. so you have to go in and correct it. This is getting better with cloud computing, but in the old days the "instance" on a box was initiated by loading an image from a CD, and the service selling you the web services didn't even bother to check that the image had some wrong TZ for the location where it was being installed.


More information about the use-livecode mailing list