English: A timezone indicator showing UTC+6 Ру...

I support a web application that is hosted on a virtual private server. The application architecture is JavaEE running under GlassFish on CentOS.

Like most ISP’s, my hosting provider builds vanilla Linux boxes that can be configured with various flavors of the OS.

Out of the box these images have their timezone set to UTC, and since my end users are in California, and I’m not doing anything on the client to handle timezone conversion, the times that come up in the application are off by 7 or 8 hours (depending on whether it’s Daylight Savings time or not.

To fix this problem, I simply relinked the localtime to the proper timezone file after making sure the timezone data is up to date.

To update the timezone, I run the following:

Now checking the date, I see the UTC displayed, so I link the right time zone like this:

So now the date shows up as Pacific Daylight Time, which is current as of today

Enhanced by Zemanta