TZ patch
Goran Thyni
goran@kirra.net
Tue May 21 16:55:00 GMT 2002
The attached patch fixes a problem with libjava
report strange TZs.
I suggest using getenv() first before trying to
reverse engineer it.
regards,
--
Göran Thyni
Index: libjava/java/util/natTimeZone.cc
===================================================================
RCS file: /cvsroot/gcc/gcc/libjava/java/util/natTimeZone.cc,v
retrieving revision 1.4
diff -c -r1.4 natTimeZone.cc
*** libjava/java/util/natTimeZone.cc 14 May 2002 05:29:30 -0000 1.4
--- libjava/java/util/natTimeZone.cc 21 May 2002 19:20:51 -0000
***************
*** 31,36 ****
--- 31,37 ----
#endif
#include <string.h>
+ #include <stdlib.h>
/*
* This method returns a time zone string that is used by init_properties
***************
*** 46,51 ****
--- 47,55 ----
long tzoffset;
const char *tz1, *tz2;
char *tzid;
+
+ tzid = getenv("TZ");
+ if (tzid) return JvNewStringUTF (tzid);
current_time = time(0);
More information about the Java-patches
mailing list