How are you collecting the timestamp and how are you transforming it?
It sounds like your transformation happends in UTC, whereas your timezone is +2.
You can see how NXSL time-related functions work in this example script:
It sounds like your transformation happends in UTC, whereas your timezone is +2.
You can see how NXSL time-related functions work in this example script:
Code Select
// current time in Unix time
timeVar = time();
// lets convert to time object in UTC timezone
timeGM = gmtime(timeVar);
// lets convert to time object in our local timezone
timeLocal = localtime(timeVar);
// lets print all of them
// remember this is in UTC timezone
println(timeGM->year . "-" . 1 + timeGM->mon . "-" . timeGM->mday . " " . timeGM->hour . ":" . timeGM->min);
// this one will be in our local time, because we are using localtime() function
println(timeLocal->year . "-" . 1 + timeLocal->mon . "-" . timeLocal->mday . " " . timeLocal->hour . ":" . timeLocal->min);
// this one should be the same, since strftime() function works in localtime
println(strftime("%Y-%m-%d %H:%M - timezone %Z - offset from UTC - %z", timeVar));