-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b10
-
generic
-
solaris_nevada
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2214947 | 7u2 | Masayoshi Okutsu | P2 | Closed | Fixed | b10 |
JDK-2214948 | 6u30 | Sean Coffey | P2 | Closed | Fixed | b10 |
While trying to debug a timing issue in other code, it was noticed that
timestamps in Cacao log files were incorrect. Investigation by a Cacao
engineer highlighted a problem with JVM timezone handling on S11.
On a system running s10s_u10wos_10, and Java version:
---
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Server VM (build 19.0-b09, mixed mode)
---
and in timezone MET the simple program given in the comments works as expected:
$ date ; java ShowDate
Tuesday, September 20, 2011 10:42:01 AM MEST
Timezone is Middle Europe Time
Date is Tue Sep 20 10:42:01 MEST 2011
however trying the same program on a system with Solaris 11 snv_173 and
Java version:
--
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)
--
the program shows that the system time is correct, but the time seen by
Java is one hour out:
$ date ; java ShowDate
Tue Sep 20 01:41:24 PDT 2011
Timezone is GMT-08:00
Date is Tue Sep 20 00:41:24 GMT-08:00 2011
For the second system the timezone is set to US/Pacific, but uses the
post-PSARC/2011/057 mechanism. File /etc/default/init contains the line:
TZ=localtime
and the timezone file links are:
/usr/share/lib/zoneinfo/localtime -> ../../../../etc/localtime
/etc/localtime -> ../usr/share/lib/zoneinfo/US/Pacific
Setting the TZ variable to be US/Pacific directly in my environment gives
the correct behaviour:
$ setenv TZ US/Pacific
$ date ; java ShowDate
Tue Sep 20 01:45:35 PDT 2011
Timezone is Pacific Standard Time
Date is Tue Sep 20 01:45:36 PDT 2011
It seems that the JVM isn't handling the S11 configuration method correctly.
timestamps in Cacao log files were incorrect. Investigation by a Cacao
engineer highlighted a problem with JVM timezone handling on S11.
On a system running s10s_u10wos_10, and Java version:
---
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Server VM (build 19.0-b09, mixed mode)
---
and in timezone MET the simple program given in the comments works as expected:
$ date ; java ShowDate
Tuesday, September 20, 2011 10:42:01 AM MEST
Timezone is Middle Europe Time
Date is Tue Sep 20 10:42:01 MEST 2011
however trying the same program on a system with Solaris 11 snv_173 and
Java version:
--
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)
--
the program shows that the system time is correct, but the time seen by
Java is one hour out:
$ date ; java ShowDate
Tue Sep 20 01:41:24 PDT 2011
Timezone is GMT-08:00
Date is Tue Sep 20 00:41:24 GMT-08:00 2011
For the second system the timezone is set to US/Pacific, but uses the
post-PSARC/2011/057 mechanism. File /etc/default/init contains the line:
TZ=localtime
and the timezone file links are:
/usr/share/lib/zoneinfo/localtime -> ../../../../etc/localtime
/etc/localtime -> ../usr/share/lib/zoneinfo/US/Pacific
Setting the TZ variable to be US/Pacific directly in my environment gives
the correct behaviour:
$ setenv TZ US/Pacific
$ date ; java ShowDate
Tue Sep 20 01:45:35 PDT 2011
Timezone is Pacific Standard Time
Date is Tue Sep 20 01:45:36 PDT 2011
It seems that the JVM isn't handling the S11 configuration method correctly.
- backported by
-
JDK-2214947 (tz) Java getting wrong timezone/DST info on Solaris 11
- Closed
-
JDK-2214948 (tz) Java getting wrong timezone/DST info on Solaris 11
- Closed
- relates to
-
JDK-8165936 Potential Heap buffer overflow when seaching timezone info files
- Resolved
-
JDK-7167359 (tz) SEGV on solaris if TZ variable not set
- Closed