<pre lang="text"><pre lang="text"><pre lang="text">
Hi All, little help needed on how we sort timezone based on the offset value. To put it simple, I got a array like below
you can check the code here.
http://jsfiddle.net/arunrajkhumar/2nvwzr6o/[
^]
The output looks like this,
(GMT-2:0) Atlantic/South_Georgia
(GMT-11:0) Pacific/Midway
(GMT-10:0) Pacific/Rarotonga
(GMT+3:0) Africa/Asmara
(GMT+2:0) Africa/Bujumbura
(GMT+5:45) Asia/Kathmandu
(GMT+14:0) Pacific/Kiritimati
(GMT+12:45) Pacific/Chatham
(GMT+12:0) Pacific/Wallis
(GMT+11:30) Pacific/Norfolk
(GMT+12:45) Pacific/Chatham
But the problem is, it needs to be sorted in order like -12, -11, -10, .. 0... 1,2,3 .. +12.. we can windows os timezone dropdown in this order.
How can we achieve this ? Please share your thoughts.