|
Java™ by example!
|
|
|
How do I generate a list of all available timezones?
If you invoke the static method getAvailableIDs on the class TimeZone, you'll get a list of time zone IDs. With such an ID, you can get the TimeZone object that encapsulates all its info (its display name, the difference in milliseconds with GMT and whether or not that Time Zone utilizes a daylight savings time). Main.java:
outputs in four columns: SHORT displayname, ID, difference in ms. with GMT and whether or not it uses a daylight savings time.
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|