Running Webapp on Mac in UTC (either changing MacBook timezone or tomcat timezone)
Posted
by
Andy A
on Super User
See other posts from Super User
or by Andy A
Published on 2012-03-30T12:13:25Z
Indexed on
2012/04/03
11:33 UTC
Read the original article
Hit count: 459
To run my web app, I need to set my timezone to UTC on my MacBook. I can do this temporarily by opening a Konsole and entering
sudo ln -sf /usr/share/zoneinfo/UTC /etc/localtime
However, my timezone returns to normal when I restart my machine!
Any advice?
Edit : The response to this question by 'Celada' implies that I can just make my Server UTC. I am using Apache Tomcat 7. Adding to Celada's response, how can I make it UTC?
Update - 3rd April : Following Celada's response, I have tried adding SetEnv TZ UTC
at the top of startup.sh. This didn't seem to make a difference. After some research, I tried adding export JAVA_OPTS="-Duser.timezone=UTC"
to startup.sh, but this too had no effect. Am I adding the correct command to the correct file?
© Super User or respective owner