Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does jdk131-b24 has fix for DST 2007 ?

 
Kalyana Sundaram
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its well known about the U.S. Daylight Saving Time Changes in 2007. My question is - Does jdk131-b24 has fix for DST 2007 ?
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java DST changes support
 
Raj Konduru
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friends,

I was wondering if we will get affected even if I am not using the TimeZone class. For instance, we do use Calendar, SimpleDateFormat, etc, however we do not use the TimeZone class. Please let me know if we still need to use the patch.

Thanks
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15274
38
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Date, SimpleDateFormat etc. use TimeZone behind the scenes. If you print a Date object to the screen by simply using toString() on it:

Date d = new Date();
System.out.println(d.toString());

then Java will print the date in the current time zone, which might be slightly different in summer or winter. For example, if I run this right now I get:

Fri Jan 12 08:10:53 CET 2007

But when it's summertime, the timezone displayed will be "CEST" instead of "CET". So yes, you could be affected even if you don't use class TimeZone directly in your source code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic