GregorianCalendar.java (computeTime): Only call getTimeZone() once.
* java/util/GregorianCalendar.java (computeTime): Only call getTimeZone() once. From-SVN: r42121
This commit is contained in:
parent
d2c4367503
commit
6f4226f843
@ -1,3 +1,8 @@
|
|||||||
|
2001-05-15 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* java/util/GregorianCalendar.java (computeTime): Only call
|
||||||
|
getTimeZone() once.
|
||||||
|
|
||||||
2001-05-14 Tom Tromey <tromey@redhat.com>
|
2001-05-14 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* java/text/SimpleDateFormat.java (parse): Clear DST_OFFSET and
|
* java/text/SimpleDateFormat.java (parse): Clear DST_OFFSET and
|
||||||
|
@ -405,7 +405,7 @@ public class GregorianCalendar extends Calendar
|
|||||||
|
|
||||||
TimeZone zone = getTimeZone();
|
TimeZone zone = getTimeZone();
|
||||||
int rawOffset = isSet[ZONE_OFFSET]
|
int rawOffset = isSet[ZONE_OFFSET]
|
||||||
? fields[ZONE_OFFSET] : getTimeZone().getRawOffset();
|
? fields[ZONE_OFFSET] : zone.getRawOffset();
|
||||||
|
|
||||||
int dayOfYear = daysOfYear[0] + daysOfYear[1];
|
int dayOfYear = daysOfYear[0] + daysOfYear[1];
|
||||||
int month = (dayOfYear * 5 + 3) / (31 + 30 + 31 + 30 + 31);
|
int month = (dayOfYear * 5 + 3) / (31 + 30 + 31 + 30 + 31);
|
||||||
|
Loading…
Reference in New Issue
Block a user