From: tromey Date: Wed, 25 Sep 2002 21:10:21 +0000 (+0000) Subject: 2002-09-25 Jesse Rosenstock X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fd05f1734ce44cc6a8f4e5524eda5ac579e4378d;p=thirdparty%2Fgcc.git 2002-09-25 Jesse Rosenstock * java/util/TimeZone.java (getDSTSavings): New method. Fixes PR libgcj/7786. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57518 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index dc94efbc3a03..242b2b11534f 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2002-09-25 Jesse Rosenstock + + * java/util/TimeZone.java (getDSTSavings): New method. + Fixes PR libgcj/7786. + 2002-09-25 Jesse Rosenstock * resolve.cc (_Jv_ResolvePoolEntry) [end_of_method_search]: Check diff --git a/libjava/java/util/TimeZone.java b/libjava/java/util/TimeZone.java index eba22363d185..6d4493001f66 100644 --- a/libjava/java/util/TimeZone.java +++ b/libjava/java/util/TimeZone.java @@ -960,6 +960,22 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable */ public abstract boolean inDaylightTime(Date date); + /** + * Gets the daylight savings offset. This is a positive offset in + * milliseconds with respect to standard time. Typically this + * is one hour, but for some time zones this may be half an our. + *

The default implementation returns 3600000 milliseconds + * (one hour) if the time zone uses daylight savings time + * (as specified by {@link #useDaylightTime()}), otherwise + * it returns 0. + * @return the daylight savings offset in milliseconds. + * @since 1.4 + */ + public int getDSTSavings () + { + return useDaylightTime () ? 3600000 : 0; + } + /** * Gets the TimeZone for the given ID. * @param ID the time zone identifier.