-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 CiarĂ¡n,
On 5/8/2009 8:04 AM, Rowe, Ciaran (IT) wrote: > I'm not so experienced in how Java/Tomcat handle timezone matters, > but I've come across a running instance of a container which claims > to be in GMT for some webapps, and US/Eastern for others. What is the time zone of the running JVM? You can check the value of the "user.timezone" system propery, or just call java.util.TimeZone.getDefault(). > The container itself appears to be logging in US/Eastern. This is most likely the default for the JVM. > I've verified through a heapdump that there are various > GregorianCalendar instances floating around memory with different > ZoneInfo instances (some ID themselves as GMT, some as US/Eastern). With a heap dump, it will be tough to determine who is using what. You might want to turn to a debugger. > Nowhere in the app code makes a clear request to have the time in > GMT, everything uses the default, so they should all report in > US/Eastern. I'm wondering what settings/behaviours in tomcat/the JVM > could effect a default timezone change for an application? When you say the "webapp is reporting times in GMT", do you mean times displayed in web pages generated by the webapp? Or do you mean web app logs or something? I'm wondering if the webapp is sniffing the time zone from the client (browser) and adjusting the time zone for that user. Or, maybe there's a user preference or something that doesn't allow you to do a simple grep through your code for "GMT". > Could the GregorianCalendar object itself be working some voodoo on > this? Why isn't everything picking up EDT as the timezone? I couldn't guess, but I would find everywhere in your application where you use Calendar or TimeZone. I'd also look at how you render times in your pages... if you are using some kind of JSP tag library or something to display dates, it might be either misconfigured, or using information you didn't expect to determine the time zone. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoImRIACgkQ9CaO5/Lv0PBvmgCfb3TNYzYgB6fLTPSGqDwA7td9 zhsAn0hWDM/qOALYftG2uINWFUTs734u =+dhz -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org