Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Timezone offset for operator in JavaScript

Highlighted
ihar_hubanau
Acclaimed Contributor

Timezone offset for operator in JavaScript

Colleagues,
Please suggest how can I receive offset (e.g GMT+3) for appropriate timezone.

As I mentioned, I can take timezone for current operator in system (ESS portal) by checking system.vars.$lo_time_zone variable (ex. Europe/Western) and I want take current offset for this timezone (e.g GMT+3) in JavaScript to display on web right time of selected DB record (now it's displayed in System Time zone Greenwich/Universal)

Thanks in advance
1 REPLY

Re: Timezone offset for operator in JavaScript

Hi There,

 

as I know there isn't a concrete timezone change option, but you can handle your system date as an xmldate object and add three hours to it with Javascript and then show the increased date on web.

 

Regards, Laszlo!

//Add this to "OnDomLoad" event