JDK-4512680 : user.timezone not initialized correctly on Solaris when TZ is not set
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_8
  • CPU: sparc
  • Submitted: 2001-10-10
  • Updated: 2001-10-10
  • Resolved: 2001-10-10
Related Reports
Duplicate :  
Relates :  

Name: gm110360			Date: 10/09/2001

java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Java HotSpot(TM) Client VM (build 1.3.0, mixed mode)

When running a JVM when an environment varilable TZ is not set, the property
user.timezone is not set at all and the default TimeZone ends up as GMT-08:00.

The variable TZ is not always set (for example, when using rlogin to login
to a machine), but even when it's not set, native utilities such as "date" or
Tcl can still display the correct timezone. It would be good if Java could
figure out the time zone in the same robust way as the native tools.
(Review ID: 133432) 

WORK AROUND Name: gm110360 Date: 10/09/2001 Make sure that TZ is always set ======================================================================

EVALUATION This is a duplicate of 4333356. Note that Solaris man page environ(5) states that TZ is one of the environment variables on which applications can assume to be set. The following is an excerpt from environ(5). The following environmental variables can be used by appli- cations and are expected to be set in the target run-time environment. ... TZ Timezone information. The contents of this environment ... So if any rlogin session doesn't provide TZ, then it's a bug on Solaris. ###@###.### 2001-10-10