Which will be the best or simpler way to get the current UTC time (including timezone) of the user running JMP?
This is UTC Time:
request = New HTTP Request( URL("google.com"), Method("GET") ); request << Send; headers = request << Get Response Headers(); show(headers["date"]);
headers["date"] is a JSL Date object in UTC
so the timezone offset would be:
utc = headers["date"];Hour(today()) - Hour(utc);
Hi,
There is a post on the community here that might be able to help: https://community.jmp.com/t5/Uncharted/UTC-Time-Zone/ba-p/28942.
BTW... you can use any url. Routers/switches use UTC time.
request = New HTTP Request( URL("google.com"), Method("GET"), ); request << Send("blob"); headers = request << Get Response Headers(); utc = headers["date"]; tz = round((today() - utc)/inhours(1)); show(tz);
This should be the complete script.