aliaspooryorik
getTickcount()
is reliable for getting the milliseconds from 1970? Seems to be the same as Java, so may just use java to be sure if doesn't do strange things with timezones or something! https://trycf.com/gist/a3aa5914b8f561acdcd49ad565885b65/acf2023?theme=monokaialiaspooryorik
Dave Merrill
07/31/2024, 12:52 PMDave Merrill
07/31/2024, 12:53 PMaliaspooryorik
Dave Merrill
07/31/2024, 1:13 PMaliaspooryorik
Dave Merrill
07/31/2024, 1:34 PMaliaspooryorik
aliaspooryorik
bkbk
08/01/2024, 1:20 PMgetTickCount()
is reliable for getting the milliseconds from the Unix epoch (January 1, 1970, 00:00 GMT). You can verify it yourself.
Here goes:
ticks=getTickCount();
secs=ticks/1000;
epoch=dateAdd("s",-secs,now());
epochToUTC=dateConvert("local2Utc",epoch);
writeoutput("Epoch to UTC: " & epochToUTC);