summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven de Marothy <sven@physto.se>2005-02-20 22:25:04 +0000
committerSven de Marothy <sven@physto.se>2005-02-20 22:25:04 +0000
commitf00eac930181afe7e9e58d7ac5462e9164d04187 (patch)
tree60af58416d078d3932d26bba1bb131c4fab17f96
parent1f077883c3c2b2eeaf6356c653d89503a02ccf76 (diff)
downloadclasspath-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--ChangeLog5
-rw-r--r--java/text/SimpleDateFormat.java6
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 19e7734a5..be6a6667e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;