mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-29 23:04:12 +08:00
re PR libgcj/19649 (java.util.Date.getTimezoneOffset returns negated output)
2004-01-28 Jeroen Frijters <jeroen@frijters.net> PR libgcj/19649 * java/util/Date.java (Date(int,int,int), Date(int,int,int,int,int)): Delegate to other constructor. (Date(int,int,int,int,int,int)): Fixed to handle out-of-range arguments. (getTimezoneOffset): Inverted sign. From-SVN: r94401
This commit is contained in:
parent
73095ebc07
commit
8f43f502de
@ -1,3 +1,13 @@
|
||||
2004-01-28 Jeroen Frijters <jeroen@frijters.net>
|
||||
|
||||
PR libgcj/19649
|
||||
* java/util/Date.java
|
||||
(Date(int,int,int), Date(int,int,int,int,int)): Delegate to other
|
||||
constructor.
|
||||
(Date(int,int,int,int,int,int)): Fixed to handle out-of-range
|
||||
arguments.
|
||||
(getTimezoneOffset): Inverted sign.
|
||||
|
||||
2005-01-26 Ranjit Mathew <rmathew@hotmail.com>
|
||||
|
||||
* testsuite/libjava.jacks/jacks.xfail: Update for PR java/19070,
|
||||
|
@ -159,7 +159,7 @@ public class Date
|
||||
*/
|
||||
public Date(int year, int month, int day)
|
||||
{
|
||||
time = new GregorianCalendar(year + 1900, month, day).getTimeInMillis();
|
||||
this(year, month, day, 0, 0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -176,9 +176,7 @@ public class Date
|
||||
*/
|
||||
public Date(int year, int month, int day, int hour, int min)
|
||||
{
|
||||
time =
|
||||
new GregorianCalendar(year + 1900, month, day, hour,
|
||||
min).getTimeInMillis();
|
||||
this(year, month, day, hour, min, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -197,9 +195,9 @@ public class Date
|
||||
*/
|
||||
public Date(int year, int month, int day, int hour, int min, int sec)
|
||||
{
|
||||
time =
|
||||
new GregorianCalendar(year + 1900, month, day, hour, min,
|
||||
sec).getTimeInMillis();
|
||||
GregorianCalendar cal =
|
||||
new GregorianCalendar(year + 1900, month, day, hour, min, sec);
|
||||
time = cal.getTimeInMillis();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -288,7 +286,7 @@ public class Date
|
||||
{
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.setTimeInMillis(time);
|
||||
return (cal.get(Calendar.ZONE_OFFSET)
|
||||
return - (cal.get(Calendar.ZONE_OFFSET)
|
||||
+ cal.get(Calendar.DST_OFFSET)) / (60 * 1000);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user