aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/util/Date.java
diff options
context:
space:
mode:
authorWarren Levy <warrenl@redhat.com>2001-01-09 07:07:51 +0000
committerWarren Levy <warrenl@gcc.gnu.org>2001-01-09 07:07:51 +0000
commit3824a4860080dbc3b140e1eb7fa2b4efed115b81 (patch)
tree59c853c9c93930e645e808160cee16a1368a3fc2 /libjava/java/util/Date.java
parent61db460830bf37e7803f95472cead5cc3ba87da3 (diff)
downloadgcc-3824a4860080dbc3b140e1eb7fa2b4efed115b81.zip
gcc-3824a4860080dbc3b140e1eb7fa2b4efed115b81.tar.gz
gcc-3824a4860080dbc3b140e1eb7fa2b4efed115b81.tar.bz2
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
Diffstat (limited to 'libjava/java/util/Date.java')
-rw-r--r--libjava/java/util/Date.java6
1 files changed, 3 insertions, 3 deletions
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();
}