Ticket #5562 (closed defect: wontfix)

SVN Diffs for #5562

 

Opened 2 years ago

Last modified 11 months ago

TimeZone.getDefault() could be out of sync with JVM default TimeZone

Reported by: yoshito Assigned to: yoshito
Priority: assess Milestone: UNSCH
Component: time_calc Version: 3.6
Keywords: Cc:
Load: Xref:
Java Version: Operating System:
Project (C/J): ICU4J Weeks: 1
Review:

Description

com.ibm.icu.util.TimeZone.getDefault() won't be refreshed after java.util.TimeZone.setDefault(TimeZone) updates JVM default time zone. For example, following code snippet does not work as expected.

String defaultIcuTzid = com.ibm.icu.util.TimeZone.getDefault().getID(); System.out.println(defaultIcuTzid); java.util.TimeZone.setDefault(java.util.TimeZone.getTimeZone("America/Los_Angeles")); defaultIcuTzid = com.ibm.icu.util.TimeZone.getDefault().getID(); System.out.println(defaultIcuTzid);

Output:

America/New_York America/New_York

Expected:

America/New_York America/Los_Angeles

Attachments

Change History

02/02/07 14:14:26 changed by andy

  • owner changed from yoshito to andy.
  • status changed from new to assigned.
  • weeks set to 1.
  • milestone set to 3.8 M2.

02/05/07 12:35:27 changed by andy

  • owner changed from andy to yoshito.
  • status changed from assigned to new.

03/29/07 13:07:53 changed by yoshito

  • load changed.
  • status changed from new to assigned.

07/11/07 12:53:04 changed by yoshito

  • priority changed from major to assess.
  • milestone changed from 3.8 M2 to 4.0.

After further investigation, we reached a conclusion that we do not want to fix this problem now. To resolve this problem, we need to create java.util.TimeZone object on every com.ibm.icu.util.TimeZone#getDefault call. I downgrade the priority to assess and will look into other options after 3.8. One of options may provide a option to use Java TimeZone in ICU like it did before, which will automatically resolve this synchronization problem.

01/07/08 09:01:38 changed by yoshito

  • status changed from assigned to closed.
  • resolution set to wontfix.
  • milestone changed from 4.0 to UNSCH.

I'll move this to "wontfix".


Add/Change #5562 (TimeZone.getDefault() could be out of sync with JVM default TimeZone)




Anti spam check: