![]() There are time zone functions in managed API which is based on.There are time zone functions in the native API, the C runtime library.The time zone information is written in the registry.Microsoft specifications mention three different ways to do this: How to find the current time zone on Windows There are two issues here: (1) how to find the current time zone on a Windows computer, and (2) the overall design of Java time zones attempting to be smarter than the computer they run on. What happens, in brief, is that Java maintains its own time zone database (containing the info about all daylight savings time changes in all regions of the world) and goes to Windows registry to find which time zone the computer is using this is the picture that transpires from Daniel Ferbers’ account. There is a similar problem with time redirection on terminals running on Windows 2008 servers which is reported here and it has an unresolved bug report on Oracle, (reported 2011, unresolved as I write it in July 2014). In June – July 2014 this bug stopped showing up any more on my Windows XP computer, apparently, due to a Java update from Oracle. I have found also a brief IBM report of 2009. Here is a more recent 2012 report from India and 2013 report. Among other accounts are a Java Forums report of 2009 and a discussion of Sun and Oracle bugs (2010, Syngapore). Among other things, this account details how time zone information in the registry is getting corrupt. The most clear and comprehensive account I have found, was due to Daniel Ferbers of Brasil, dated 2010. ![]() On Linux, the displayed time was fine but on Windows XP the Java default time zone was incorrect, not Asia/Jerusalem but rather America/Bahia which was 5 hours off.Īn internet search showed a long history of similar complaints on Java incorrectly reading the default time zone on Windows. I developed a Java desktop application which involved displaying the current time. ![]() ![]() I first bumped into this problem in the beginning of 2014. However, this time zone has often been incorrect on Windows computers. For this purpose Java has the concept of default time zone which is an instance of TimeZone class which is returned by (). Many programs need to be able to find out the current time of the computer they are running on, and its time zone, without hard coding it. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |