summaryrefslogtreecommitdiff
path: root/java/text/SimpleDateFormat.java
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2005-01-25 19:52:48 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2005-01-25 19:52:48 +0000
commitf49839a2d6f09708799455b5c1effe96737e67c6 (patch)
tree2863a6244ae5f6a51cd095bc99fa5a237f8534f9 /java/text/SimpleDateFormat.java
parent95dcbcd5e63fc5ec9c62ca4b4c25ed6852ccb977 (diff)
downloadclasspath-f49839a2d6f09708799455b5c1effe96737e67c6.tar.gz
2005-01-25 Ito Kazumitsu <kaz@maczuka.gcd.org>
* java/text/SimpleDateFormat.java: (parse): Use offset to set ZONE_OFFSET rather than the DST_OFFSET, so that GMT offset timezones change the right one.
Diffstat (limited to 'java/text/SimpleDateFormat.java')
-rw-r--r--java/text/SimpleDateFormat.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/java/text/SimpleDateFormat.java b/java/text/SimpleDateFormat.java
index 568eeaae8..afe07c107 100644
--- a/java/text/SimpleDateFormat.java
+++ b/java/text/SimpleDateFormat.java
@@ -840,7 +840,7 @@ public class SimpleDateFormat extends DateFormat
// We need a special case for the timezone, because it
// uses a different data structure than the other cases.
is_numeric = false;
- calendar_field = Calendar.DST_OFFSET;
+ calendar_field = Calendar.ZONE_OFFSET;
String[][] zoneStrings = formatData.getZoneStrings();
int zoneCount = zoneStrings.length;
int index = pos.getIndex();
@@ -868,8 +868,8 @@ public class SimpleDateFormat extends DateFormat
found_zone = true;
saw_timezone = true;
TimeZone tz = TimeZone.getTimeZone (strings[0]);
- calendar.set (Calendar.ZONE_OFFSET, tz.getRawOffset ());
- offset = tz.getDSTSavings();
+ calendar.set (Calendar.DST_OFFSET, tz.getDSTSavings());
+ offset = tz.getRawOffset ();
pos.setIndex(index + strings[k].length());
break;
}