Commit e969bcdb by Michael Koch Committed by Michael Koch

TimeZone.java (getOffset): New method.

2003-12-18  Michael Koch  <konqueror@gmx.de>

	* java/util/TimeZone.java (getOffset): New method.

From-SVN: r74784
parent bc5ada84
2003-12-18 Michael Koch <konqueror@gmx.de>
* java/util/TimeZone.java (getOffset): New method.
2003-12-17 Fernando Nasser <fnasser@redhat.com>
* gnu/java/awt/peer/gtk/GtkListPeer.java (handleEvent): Fix generation
......
/* java.util.TimeZone
Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
Free Software Foundation, Inc.
This file is part of GNU Classpath.
......@@ -810,6 +811,21 @@ public abstract class TimeZone implements java.io.Serializable, Cloneable
int day, int dayOfWeek, int milliseconds);
/**
* Get the time zone offset for the specified date, modified in case of
* daylight savings. This is the offset to add to UTC to get the local
* time.
* @param date the date represented in millisecends
* since January 1, 1970 00:00:00 GMT.
* @since 1.4
*/
public int getOffset(long date)
{
return (inDaylightTime(new Date(date))
? getRawOffset() + getDSTSavings()
: getRawOffset());
}
/**
* Gets the time zone offset, ignoring daylight savings. This is
* the offset to add to UTC to get the local time.
* @return the time zone offset in milliseconds.
......
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