From 3824a4860080dbc3b140e1eb7fa2b4efed115b81 Mon Sep 17 00:00:00 2001 From: Warren Levy Date: Tue, 9 Jan 2001 07:07:51 +0000 Subject: 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 --- libjava/java/util/Date.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libjava/java/util/Date.java') diff --git a/libjava/java/util/Date.java b/libjava/java/util/Date.java index 4b76b8a..d3301be 100644 --- a/libjava/java/util/Date.java +++ b/libjava/java/util/Date.java @@ -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(); } -- cgit v1.1