Running Webapp on Mac in UTC (either changing MacBook timezone or tomcat timezone)
- by Andy A
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?