natSystem.cc (getSystemTimeZone): Adjust for DST.
* java/lang/natSystem.cc (getSystemTimeZone): Adjust for DST. * java/text/SimpleDateFormat.java (indexInArray): Removed private method. (processYear): Removed private method. (parseLenient): Removed private method. (parseLeadingZeros): Removed private method. (parseStrict): Removed private method. (expect): Added new private method. (parse): Reverted to pre-Classpath merge version with minor fixes. * java/util/natGregorianCalendar.cc (computeTime): Handle strict calendars. From-SVN: r41456
This commit is contained in:
@@ -249,9 +249,11 @@ java::lang::System::getSystemTimeZone (void)
|
||||
|
||||
mktime(tim = localtime(¤t_time));
|
||||
#ifdef STRUCT_TM_HAS_GMTOFF
|
||||
tzoffset = -(tim->tm_gmtoff); // tm_gmtoff is secs EAST of UTC.
|
||||
// tm_gmtoff is secs EAST of UTC.
|
||||
tzoffset = -(tim->tm_gmtoff) + tim->tm_isdst * 3600L;
|
||||
#elif HAVE_TIMEZONE
|
||||
tzoffset = timezone; // timezone is secs WEST of UTC.
|
||||
// timezone is secs WEST of UTC.
|
||||
tzoffset = timezone;
|
||||
#else
|
||||
// FIXME: there must be another global if neither tm_gmtoff nor timezone
|
||||
// is available, esp. if tzname is valid.
|
||||
|
||||
Reference in New Issue
Block a user