Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TimeZone and Daylight Savings Time 2007

 
Marilyn de Queiroz
Sheriff
Posts: 9065
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We ran into an issue and I wanted to give everyone a heads up. If the timezone is defined as EST, MST, or HST, the behavior has changed. These 3 used to flip back and forth from standard time to daylight savings time. With the DST patch, these three now stay on standard time constantly.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe it should move on to EDT from EST
 
Marilyn de Queiroz
Sheriff
Posts: 9065
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It used to. But with the latest patch, it no longer moves.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah, finally. Seems to me that MST should mean MST, not MDT. It's unfortunate that Sun's JDKs supported such misleading terminology for so long.

Note that the API for TimeZone does say:
Three-letter time zone IDs

For compatibility with JDK 1.1.x, some other three-letter time zone IDs (such as "PST", "CTT", "AST") are also supported. However, their use is deprecated because the same abbreviation is often used for multiple time zones (for example, "CST" could be U.S. "Central Standard Time" and "China Standard Time"), and the Java platform can then only recognize one of them.


Programmers needing to retain the old behavior (assuming it's too much trouble to fix the time zone codes to something more appropriate) can follow the instructions in this Sun alert.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic