This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java in General and the fly likes TimeZone Question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "TimeZone Question" Watch "TimeZone Question" New topic
Author

TimeZone Question

Michael Arnett
Ranch Hand

Joined: Mar 22, 2001
Posts: 65
Hi All,
I am trying to create a calendar object that will be set to Bermuda's current time. The questions I have are:
1. Which timezone ID to use for Bermuda?
2. Does this timezone automatically account for Daylight Savings Time?
Thanks in advance,
-MLA


Sun Certified Programmer for the Java 2 Platform 1.4
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1815
Bermuda is in the Atlantic Timezone. ADT (Atlantic Daylight time) should take Daylight Savings into account.


Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Tim Morrow
Greenhorn

Joined: Sep 17, 2003
Posts: 11
One interesting thing to note is that Java has "deprecated" the use of 3-letter time zone codes, due to the ambiguity of some of them (their example is "CST" could mean "Central Standard Time" or "China Standard Time". You can read about this here:
TimeZone
Of course, in this case "ADT" is probably not ambiguous.
Anyway, the "long" form of the Bermuda time zone code is "Atlantic/Bermuda" which is UTC-4:00 and supports standard and daylight savings.
You might find it useful to list all the time zones available using TimeZone.getAvailableIDs.
Tim
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: TimeZone Question
 
Similar Threads
TimeZones
How to get country name for a particluar TimeZone object??
TimeZone and Daylight Saving Time
Timezones
Convert Date from one timezone to another