diff options
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/classpath/ChangeLog.gcj | 5 | ||||
-rw-r--r-- | libjava/classpath/java/util/TimeZone.java | 9 |
2 files changed, 6 insertions, 8 deletions
diff --git a/libjava/classpath/ChangeLog.gcj b/libjava/classpath/ChangeLog.gcj index b76844ae590..0c980f852a2 100644 --- a/libjava/classpath/ChangeLog.gcj +++ b/libjava/classpath/ChangeLog.gcj @@ -1,3 +1,8 @@ +2007-02-26 Jakub Jelinek <jakub@redhat.com> + + * java/util/TimeZone.java (getDefaultDisplayName): Don't + check if TimeZone is instanceof SimpleTimeZone. + 2007-02-21 Gary Benson <gbenson@redhat.com> * java/util/GregorianCalendar.java, diff --git a/libjava/classpath/java/util/TimeZone.java b/libjava/classpath/java/util/TimeZone.java index cede9fc789f..5329e06c11f 100644 --- a/libjava/classpath/java/util/TimeZone.java +++ b/libjava/classpath/java/util/TimeZone.java @@ -1402,14 +1402,7 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable private String getDefaultDisplayName(boolean dst) { - int offset = getRawOffset(); - if (dst && this instanceof SimpleTimeZone) - { - // ugly, but this is a design failure of the API: - // getDisplayName takes a dst parameter even though - // TimeZone knows nothing about daylight saving offsets. - offset += ((SimpleTimeZone) this).getDSTSavings(); - } + int offset = getRawOffset() + (dst ? getDSTSavings() : 0); StringBuffer sb = new StringBuffer(9); sb.append("GMT"); |