• Post Reply Bookmark Topic Watch Topic
  • New Topic

EST instead of EDT  RSS feed

 
sri rallapalli
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,
I am currently using an application, and we did changes for effecting the DST(day light savings time). i am trying to get the time zones in my logs also, but what i found was, sometimes, i am getting EST and some times i am getting EDT. I am supposed to get EDT in all the places. In my java code i am using something like:
static
{
TimeZone.setDefault(TimeZone.getTimeZone(System.getProperty("SystemTimes.TimeZone","EST")));
}

I tried changing the EST to EDT, then i am getting GMT in my logs. What needs to be done to get EDT into my logs instead of EST.

Regards,
Sri.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you ran into the same problem discussed here. Why should anyone ask for EST and expect the result to be EDT? Yes, old Java versions fave this behavior because someone screwed up back in JDK 1.1, and it took this long to fix it. But three-letter timezone IDs have been deprecated since JDK 1.2. Try setting the time zone to America/New_York instead. If you still don't like the output format, you can use a SimpleDateFormat to change it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!