summaryrefslogtreecommitdiffstats
path: root/libjava/java/util/natTimeZone.cc
diff options
context:
space:
mode:
authorwarrenl <warrenl@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-09 07:07:51 +0000
committerwarrenl <warrenl@138bc75d-0d04-0410-961f-82ee72b054a4>2001-01-09 07:07:51 +0000
commite6d0fc23849aa6b9a0b9b4173f19a3a64f997700 (patch)
tree59c853c9c93930e645e808160cee16a1368a3fc2 /libjava/java/util/natTimeZone.cc
parentd32ccca71d726900c377e0f90ae22f273b809935 (diff)
downloadppe42-gcc-e6d0fc23849aa6b9a0b9b4173f19a3a64f997700.tar.gz
ppe42-gcc-e6d0fc23849aa6b9a0b9b4173f19a3a64f997700.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38816 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/util/natTimeZone.cc')
-rw-r--r--libjava/java/util/natTimeZone.cc72
1 files changed, 0 insertions, 72 deletions
diff --git a/libjava/java/util/natTimeZone.cc b/libjava/java/util/natTimeZone.cc
deleted file mode 100644
index 61128c833b6..00000000000
--- a/libjava/java/util/natTimeZone.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Copyright (C) 2000 Free Software Foundation
-
- This file is part of libgcj.
-
-This software is copyrighted work licensed under the terms of the
-Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
-details. */
-
-#include <config.h>
-
-#include <gcj/cni.h>
-#include <java/util/TimeZone.h>
-
-#include <stdio.h>
-#include <string.h>
-
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif
-
-/*
- * This method returns a time zone string that is used by the static
- * initializer in java.util.TimeZone to create the default timezone
- * instance. This is a key into the timezone table used by
- * that class.
- */
-jstring
-java::util::TimeZone::getDefaultTimeZoneId (void)
-{
- time_t current_time;
- char **tzinfo, *tzid;
- long tzoffset;
- jstring retval;
-
- current_time = time(0);
-
- mktime(localtime(&current_time));
- tzinfo = tzname;
- tzoffset = timezone;
-
- if ((tzoffset % 3600) == 0)
- tzoffset = tzoffset / 3600;
-
- if (!strcmp(tzinfo[0], tzinfo[1]))
- {
- tzid = (char*) _Jv_Malloc (strlen(tzinfo[0]) + 6);
- if (!tzid)
- return NULL;
-
- sprintf(tzid, "%s%ld", tzinfo[0], tzoffset);
- }
- else
- {
- tzid = (char*) _Jv_Malloc (strlen(tzinfo[0]) + strlen(tzinfo[1]) + 6);
- if (!tzid)
- return NULL;
-
- sprintf(tzid, "%s%ld%s", tzinfo[0], tzoffset, tzinfo[1]);
- }
-
- retval = JvNewStringUTF (tzid);
- _Jv_Free (tzid);
- return retval;
-}
-
OpenPOWER on IntegriCloud