Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Time Zone Names

Hello,

 

I have been working on a clock face that lists the current time zone (as in: EST, MDT).  I am encountering 2 problems.

1) The getTimezoneOffset only returns the local timezone offset.  I am unable to get it to look at a different date's offset.

 

 let winter = new Date(2018, 0, 1);
 let summer = new Date(2018, 6, 1);

Both times return the same value.

 

2) I tried to use the Intl.DateTimeFormat function.  This appears to be unsupported.

 

let myOptions = {timeZoneName : 'Short'};
let myInt = new Intl.DateTimeFormat('en-US', myOptions).format(date);

 

Any words of wisdom?

 

Best Answer
0 Votes
1 REPLY 1

The Device only supports ES 5.1 JavaScript, you could utilize the JavaScript environment in the Companion API which does support what you need, then send that to the device via the the Messaging API.

Best Answer
0 Votes