Hi All
Standard first post disclaimer... I am new to Livecode currently learning the ropes to allow me to move away from Filemaker. Very exciting times as it seems there are far more possibilities ahead.
I have a very basic question in that I would like to know how to put the UTC into a variable. This UTC will be used as a sync timestamp. Im guessing something similar to;
Put the UTC into tTimestampUTC
Many Thanks in Advance
UTC [Universal Time]
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: UTC [Universal Time]
Hello hrcap,
welcome to the forum!
LC does not support UTC directly, but you can always get the time (or seconds since 1/1/1970), which if then fetched from the underlying machine. Maybe something like this is what you are looking for:
I can recommend these stacks to learn more about the basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html
Best
Klaus
welcome to the forum!
LC does not support UTC directly, but you can always get the time (or seconds since 1/1/1970), which if then fetched from the underlying machine. Maybe something like this is what you are looking for:
Code: Select all
...
put the seconds into tTimestampUTC
## or even:
## put the millisecs into tTimestampUTC
...
http://www.hyperactivesw.com/revscriptc ... ences.html
Best
Klaus
Re: UTC [Universal Time]
...or, you might use the internet date ~
The internet date form returns the following parts, separated by spaces:
* the day of the week followed by a comma
* the day of the month
* the three-letter abbreviation for the month name
* the four-digit year
* the time in 24-hour format, including seconds, delimited by colons
* the four-digit time zone relative to UTC (Greenwich) time
Re: UTC [Universal Time]
Thank you very much for the swift responses, I've gone for the 'put the seconds' option and it appears to be working nicely.
Many Thanks
Many Thanks