I am running a Tomcat application, and I need to display some time values. Unfortunately, the time is coming up an hour off. I looked into it and discovered that my defaul
On Ubuntu, it's not enough to just change the /etc/localtime file. It seems to read /etc/timezone file, too. It's better follow the instruction to set the time zone properly. In particular, do the following:
$ sudo cp /etc/timezone /etc/timezone.dist
$ echo "Australia/Adelaide" | sudo tee /etc/timezone
Australia/Adelaide
$ sudo dpkg-reconfigure --frontend noninteractive tzdata
Current default time zone: 'Australia/Adelaide'
Local time is now: Sat May 8 21:19:24 CST 2010.
Universal Time is now: Sat May 8 11:49:24 UTC 2010.
On my Ubuntu, if /etc/localtime and /etc/timezone are inconsistent, Java seems to read default time zone from /etc/timezone .