The following code snippet
... String [] ids = TimeZone.getAvailableIDs(); for(String id:ids) { TimeZone zone = TimeZone.getTimeZone(id); int offset = zone.getRawOffset()/1000; int hour = offset/3600; int minutes = (offset % 3600)/60; System.err.println(String.format("(GMT%+d:%02d) %s", hour, minutes, id)); } ...
displays formatted time zones, for example:
(GMT+12:00) Pacific/Tarawa (GMT+12:00) Pacific/Wake (GMT+12:00) Pacific/Wallis (GMT+12:45) NZ-CHAT
You might want to add filtering for different offsets and / or time zones specified in zone.getDisplayName(zone.useDaylightTime(), TimeZone.SHORT) .
source share