In java getting different value for TimeZone.getDefault().getID() on different system

Posted by Deepak Chaudhry on Stack Overflow See other posts from Stack Overflow or by Deepak Chaudhry
Published on 2011-11-22T09:41:34Z Indexed on 2011/11/22 9:49 UTC
Read the original article Hit count: 265

Filed under:
|
|

I am getting different value for TimeZone.getDefault().getID() on different systems. For example, in case of Indian standard time, On one of the system we are getting "GMT+5:30": while on another we are getting "Asia/Calcutta". We are expected to get "Asia/calcutta" strings on all machines.

Why is there an inconsistency for such behavior?

Is there any way to get consistent behavior across different systems windows/MAC?

What is the best way to get client time zone programmatically using Java?

© Stack Overflow or respective owner

Related posts about java

Related posts about time