Commit 8dc24041 by Jesse Rosenstock Committed by Tom Tromey

re PR libgcj/7786 (TimeZone.getDSTSavings() from JDK1.4 not implemented)

2002-09-25  Jesse Rosenstock  <jmr@ugcs.caltech.edu>

	* java/util/TimeZone.java (getDSTSavings): New method.
	Fixes PR libgcj/7786.

From-SVN: r57518
parent 8848a766
2002-09-25 Jesse Rosenstock <jmr@ugcs.caltech.edu>
* java/util/TimeZone.java (getDSTSavings): New method.
Fixes PR libgcj/7786.
2002-09-25 Jesse Rosenstock <jmr@ugcs.caltech.edu>
* resolve.cc (_Jv_ResolvePoolEntry) [end_of_method_search]: Check
to see if `the_method == 0' before looking up vtable index.
Fixes PR libgcj/7709.
......
......@@ -961,6 +961,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.
* <p>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.
* @return The time zone for the identifier or GMT, if no such time
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment