How do I output timezone offsets based on the list of regions present in http://php.net/manual/en/timezones.php ?
Ideally, I would like it “arranged” in UTC-12:00 to UTC+12:00 format.
So,
America/New_York should generate UTC-4:00
UTC should be UTC
Asia/Damascus should be UTC+3:00
etc
It should match http://en.wikipedia.org/wiki/List_of_tz_database_time_zones in its output of course…
Q2: Is there some standardized order in which I can display this list? Of course, GMT-11 to GMT+12, but since many regions overlap, how should I be displaying those? All of these regions will be part of one dropdown:
(GMT-11:00) Pacific/Niue
(GMT-11:00) Pacific/Apia
(GMT-11:00) Pacific/Midway
(GMT-11:00) Pacific/Pago_Pago
(GMT-10:00) Pacific/Fakaofo
(GMT-10:00) Pacific/Rarotonga
(GMT-10:00) Pacific/Johnston
(GMT-10:00) Pacific/Tahiti
(GMT-10:00) Pacific/Honolulu
[but what order should the above be in?]
Simply ordered by offset and then alphabetical. Would have preferred a more ‘geographic’ approach – but didnt find anything pointing out how to do it.