diff options
author | Sven de Marothy <sven@physto.se> | 2005-02-20 22:25:04 +0000 |
---|---|---|
committer | Sven de Marothy <sven@physto.se> | 2005-02-20 22:25:04 +0000 |
commit | f00eac930181afe7e9e58d7ac5462e9164d04187 (patch) | |
tree | 60af58416d078d3932d26bba1bb131c4fab17f96 | |
parent | 1f077883c3c2b2eeaf6356c653d89503a02ccf76 (diff) | |
download | classpath-f00eac930181afe7e9e58d7ac5462e9164d04187.tar.gz |
2005-02-20 Sven de Marothy <sven@physto.se>
* java/text/SimpleDateFormat.java,
(parse): Set DST_OFFSET to the correct value.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | java/text/SimpleDateFormat.java | 6 |
2 files changed, 10 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2005-02-20 Sven de Marothy <sven@physto.se> + + * java/text/SimpleDateFormat.java, + (parse): Set DST_OFFSET to the correct value. + 2005-02-20 Rutger Ovidius <ovidr@users.sourceforge.net> * gnu/java/security/provider/Gnu.java (Gnu): Add SHA-160 alias. diff --git a/java/text/SimpleDateFormat.java b/java/text/SimpleDateFormat.java index dc6a27498..a99792927 100644 --- a/java/text/SimpleDateFormat.java +++ b/java/text/SimpleDateFormat.java @@ -1019,7 +1019,11 @@ public class SimpleDateFormat extends DateFormat found_zone = true; saw_timezone = true; TimeZone tz = TimeZone.getTimeZone (strings[0]); - calendar.set (Calendar.DST_OFFSET, tz.getDSTSavings()); + // Check if it's a DST zone or ordinary + if(k == 3 || k == 4) + calendar.set (Calendar.DST_OFFSET, tz.getDSTSavings()); + else + calendar.set (Calendar.DST_OFFSET, 0); offset = tz.getRawOffset (); pos.setIndex(index + strings[k].length()); break; |