JDK-8213551 : Initial value of user.timezone system property change
  • Type: CSR
  • Component: core-libs
  • Sub-Component: java.lang
  • Priority: P3
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 12
  • Submitted: 2018-11-08
  • Updated: 2018-11-09
  • Resolved: 2018-11-09
Related Reports
CSR :  
Description
Summary
-------

The initial value of the system property user.timezone is changed from the empty string to undefined.

Problem
-------

The initial value used for the default timezone is unnecessarily split between native code and the java.util.TimeZone implementation.  
The split has a very small maintenance cost and very small performance impact.

Solution
--------

Removing the initialization of user.timezone to the empty string enables
some code cleanup and avoids the overhead of processing the property value when it is the default value.

This change does not change the ability to set user.timezone property on the command line using -Duser.timezone=xxx.


Specification
-------------

This is a behavior change only, there is no specification of the initial value of the user.timezone property.

The user.timezone system property will be undefined unless set using a command line argument -Duser.timezone=xxx.




Comments
I believe the compatibility assessment of "minimal" is overly optimistic and this request is closer to "low"; I will update the field accordingly. There are multiple stackoverflow and web hits for getProperty("user.timezone") so in practice there will be de facto assumptions about the behavior of this idiom in existing programs. Approving conditional on a release note being written. The change is approved for 12.
09-11-2018