-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
5.0
-
x86
-
windows_xp
FULL PRODUCT VERSION :
java version "1.5.0_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
Java HotSpot(TM) Client VM (build 1.5.0_10-b03, mixed mode, sharing)
Also repeatable on:
1.5.0_08
1.5.0_09
1.6.*
Regression: it works on 1.5.0_07 and earlier.
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
Linux expo 2.6.8-3-686 #1 Tue Dec 5 21:26:38 UTC 2006 i686 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
Method TimeZone.inDaylightTime(Date) returns false for any argument.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile and run the source code.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Output:
date: 2005-01-01; dst=false
date: 2005-07-01; dst=true
ACTUAL -
date: 2005-01-01; dst=false
date: 2005-07-01; dst=false
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.text.*;
import java.util.*;
public class tztest {
private static final DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
private static final TimeZone tz = TimeZone.getTimeZone("EST");
public static void main(String[] args) throws ParseException {
check("2005-01-01");
check("2005-07-01");
}
private static void check(String s) throws ParseException {
Date date = format.parse(s);
System.out.println("date: " + s + "; dst=" + tz.inDaylightTime(date));
}
}
---------- END SOURCE ----------
java version "1.5.0_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
Java HotSpot(TM) Client VM (build 1.5.0_10-b03, mixed mode, sharing)
Also repeatable on:
1.5.0_08
1.5.0_09
1.6.*
Regression: it works on 1.5.0_07 and earlier.
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
Linux expo 2.6.8-3-686 #1 Tue Dec 5 21:26:38 UTC 2006 i686 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
Method TimeZone.inDaylightTime(Date) returns false for any argument.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile and run the source code.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Output:
date: 2005-01-01; dst=false
date: 2005-07-01; dst=true
ACTUAL -
date: 2005-01-01; dst=false
date: 2005-07-01; dst=false
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.text.*;
import java.util.*;
public class tztest {
private static final DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
private static final TimeZone tz = TimeZone.getTimeZone("EST");
public static void main(String[] args) throws ParseException {
check("2005-01-01");
check("2005-07-01");
}
private static void check(String s) throws ParseException {
Date date = format.parse(s);
System.out.println("date: " + s + "; dst=" + tz.inDaylightTime(date));
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-6466476 (tz) Introduction of tzdata2005r can introduce incompatility issues with some JDK1.1 3-letter TZ Ids
- Closed