But that will only work for those time zones whose variation from UTC is
an exact number of hours.
the internet date has 4 digits so that it can handle hour and minute
variations - you could change
subtract (char 1 to -3 of last word of the internet date) from item 4
of tTime
to
put the last word of the internet time into tmp
subtract (char 1 to -3 of tmp) from item 4 of tTime
subtract (char 1 of tmp & char -2 to -1 of tmp) ) from item 5 of tTime
and then you would be handling all cases correctly.
Alex.
On 30/10/2020 20:06, J. Landman Gay via use-livecode wrote:
On 10/29/20 4:33 PM, Graham Samuel via use-livecode wrote:
The only souci with this format is that it gives the month in alpha,
presumably according to the nationality of the OS. But it’s easy to
get the numeric month in other ways. Still, it is just a little bit
fiddly to create a full UTC date of the format:
YYYY-MM-DDThh:mm:ssTZD
Here's something I use:
put the seconds into tTime
convert tTime to dateitems
subtract (char 1 to -3 of last word of the internet date) from item
4 of tTime
convert tTime to dateitems
set the numberformat to "00"
put item 1 of tTime &"-"& (item 2 of tTime)+0 &"-"& (item 3 of
tTime)+0 & "T" & (item 4 of tTime)+0 &":"& \
(item 5 of tTime)+0 &":"& (item 6 of tTime)+0 & "Z" into
tTimestamp
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode