TimeZone.java: Handle default (one hour) daylight savings.

2007-02-09  Jakub Jelinek  <jakub@redhat.com>

        * java/util/TimeZone.java: Handle default (one hour) daylight
        savings.

From-SVN: r121766
This commit is contained in:
Jakub Jelinek 2007-02-09 18:14:46 +00:00 committed by Andrew Haley
parent 87a8ec2bf7
commit 8413669bde
1 changed files with 9 additions and 2 deletions

View File

@ -977,6 +977,13 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable
if (index < idLength)
index--;
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;