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:
Warren Levy 2001-04-20 09:43:52 +00:00 committed by Warren Levy
parent 7471a1f03c
commit a6f5b6f958
4 changed files with 271 additions and 664 deletions

View file

@ -249,9 +249,11 @@ java::lang::System::getSystemTimeZone (void)
mktime(tim = localtime(&current_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.