Script to Generate Concurrent Times
devin_asay at byu.edu
Wed Jan 14 17:27:37 CET 2015
On Jan 13, 2015, at 10:21 PM, Brahmanathaswami <brahma at hindu.org> wrote:
> We are planning to do some webinars. I am looking for a liveCode script that can read a time value on our web server and output a little array like:
> Honolulu: 1:30 PM Sunday Jan 16
> San Franscisco 4:30 PM Sunday Jan 16
> Chicago 6:30 PM Sunday Jan 16
> Toronto: 6:30PM Sunday Jan 16
> New York: 7:30PM Sunday Jan 16
> Rio de Janeiro: 8:30PM Sunday Jan 16
> Perth: 7:30 AM Monday Jan 16
> Sydney: 11:30 Monday Jan 16
> Yes, I could probably find this as JS/php script, but no, i don't want to do that, as I'm a bit crazy about trying to stay with LC!
Someone a few years ago showed me this; I can’t remember who.
In your .lc script do this:
put "US/Mountain" into $TZ # or whatever time zone you want to show
put shell("date") into tDTstring
Setting the $TZ variable right before called the date command returns the date/time the specified timezone. At least it works on the on-rev servers.
Office of Digital Humanities
Brigham Young University
More information about the use-livecode