re PR libgcj/1411 (natTimeZone.cc should be removed)

Fix for PR libgcj/1411:
	* Makefile.am: Removed java/util/natTimeZone.cc.
	* Makefile.in: Rebuilt.
	* gnu/gcj/text/LocaleData_en_US.java (zoneStringsDefault): Added
	missing localized timezone names.
	* java/lang/System.java (getDefaultTimeZoneId): New private method.
	* java/lang/natSystem.cc (getSystemTimeZone): New private method.
	(init_properties): Set user.timezone property.
	* java/text/DateFormatSymbols.java (zoneStringsDefault): Added
	default timezone names; removed non-standard ones.  Use standard
	ID names per JCL.
	* java/util/Date.java (toGMTString): Removed zoneGMT variable.
	(UTC): Ditto.
	* java/util/TimeZone.java: Add standard ID names per JCL; removed
	non-standard ones.
	(getDefaultTimeZoneId): Removed.
	(zoneGMT): Removed.
	(getDefaultTimeZoneId): Removed.
	* java/util/natTimeZone.cc: Removed.

From-SVN: r38816
This commit is contained in:
Warren Levy 2001-01-09 07:07:51 +00:00 committed by Warren Levy
parent 61db460830
commit 3824a48600
10 changed files with 242 additions and 146 deletions

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1998, 1999, 2000 Free Software Foundation
/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation
This file is part of libgcj.
@ -461,7 +461,7 @@ public class Date implements java.io.Serializable, Cloneable
// This method is deprecated. We don't care if it is very slow.
SimpleDateFormat fmt = new SimpleDateFormat ("d MMM yyyy HH:mm:ss 'GMT'",
Locale.US);
fmt.setTimeZone(TimeZone.zoneGMT);
fmt.setTimeZone(TimeZone.getTimeZone("GMT"));
return fmt.format(this);
}
@ -476,7 +476,7 @@ public class Date implements java.io.Serializable, Cloneable
public static long UTC (int year, int month, int date,
int hours, int minutes, int seconds)
{
GregorianCalendar cal = new GregorianCalendar (TimeZone.zoneGMT);
GregorianCalendar cal = new GregorianCalendar (TimeZone.getTimeZone("GMT"));
cal.set(year+1900, month, date, hours, minutes, seconds);
return cal.getTimeInMillis();
}