0
Completed

current timezone and other time functions

r riksma 10 years ago in iRidium Script updated by Olga (expert) 10 years ago 2
As a workaround for the problem of cached requests I want to include the current device time in my http request.
http://support.iridiummobile.net/topic/671754-cache-of-command-in-offline-mode/
This way when a request is made that is older than a few minutes it will be blocked by the server.
It works fine for now but i am afraid i will run into problems when requests are made from a different time zone.
Could you add a command to get the current timezone, or one that always returns the current time in UTC? It would be even better to have a bunch of helper functions, like the ruby time object has for instance: http://ruby-doc.org/core-1.9.3/Time.html

Answer

Answer
Completed
Dear Sir,

Here is the string which gives full date with time and time zone (GMT).

var now = new Date();

Time can be converted from UTC to GMT using the script (please see the example in the attachment).

testUTC.irpz
Answer
Completed
Dear Sir,

Here is the string which gives full date with time and time zone (GMT).

var now = new Date();

Time can be converted from UTC to GMT using the script (please see the example in the attachment).

testUTC.irpz