diff options
author | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-09 18:14:46 +0000 |
---|---|---|
committer | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-02-09 18:14:46 +0000 |
commit | c6d4f471fef8487f5f4f5a30cd99f4bde182514b (patch) | |
tree | 0eae34593964e4a459980193f337178163caba06 /libjava/classpath/java/util/TimeZone.java | |
parent | 3af66c4982934f4e43b3914e7cd5cb9ff5be2f7b (diff) | |
download | ppe42-gcc-c6d4f471fef8487f5f4f5a30cd99f4bde182514b.tar.gz ppe42-gcc-c6d4f471fef8487f5f4f5a30cd99f4bde182514b.zip |
2007-02-09 Jakub Jelinek <jakub@redhat.com>
* java/util/TimeZone.java: Handle default (one hour) daylight
savings.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121766 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/java/util/TimeZone.java')
-rw-r--r-- | libjava/classpath/java/util/TimeZone.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libjava/classpath/java/util/TimeZone.java b/libjava/classpath/java/util/TimeZone.java index 4f25016c577..f349b031e95 100644 --- a/libjava/classpath/java/util/TimeZone.java +++ b/libjava/classpath/java/util/TimeZone.java @@ -977,7 +977,14 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable if (index < idLength) index--; - { // convert the dst string to a millis number + if (index == prevIndex && (c == ',' || c == ';')) + { + // Missing dst offset defaults to one hour ahead of standard + // time. + dstOffs = stdOffs + 60 * 60 * 1000; + } + else + { // convert the dst string to a millis number String offset = sysTimeZoneId.substring(prevIndex, index); prevIndex = index; @@ -991,7 +998,7 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable // TZ timezone offsets are positive when WEST of the meridian. dstOffs = -dstOffs; - } + } // Done yet? (Format: std offset dst offset) // FIXME: We don't support DST without a rule given. Should we? |