How do I change the default time zone for users in Confluence?
Purpose
This will change the default time zone for all users in Confluence (if they are relying on the system default). This will not change the time zone for users that have already specified their preferred timezone in their profile settings.
Solution
1. Modify preferences-default.xml in the Confluence JAR
Navigate to Confluence-Installation Directory >> confluence >> WEB-INF >> lib
and modify the confluence-x.x.jar (x.x varies depending on your Confluence version). Edit the preferences-default.xml (for more info on how to edit JAR files, refer here: How to edit files in Confluence JAR files). You should see something like this:
<preferences>
<!--
<preference type="Long">
<name>user.issues.per.page</name>
<value>20</value>
</preference>
-->
<preference type="String">
<name>confluence.prefs.email.mimetype</name>
<value>text/html</value>
</preference>
<preference type="Boolean">
<name>confluence.prefs.email.notify</name>
<value>true</value>
</preference>
<preference type="Boolean">
<name>confluence.prefs.notify.on.new.followers</name>
<value>true</value>
</preference>
<preference type="Boolean">
<name>confluence.prefs.email.show.diff</name>
<value>true</value>
</preference>
<preference type="Boolean">
<name>confluence.prefs.email.show.full.content</name>
<value>true</value>
</preference>
<preference type="Boolean">
<name>confluence.prefs.watch.my.own.content</name>
<value>true</value>
</preference>
<preference type="Boolean">
<name>confluence.prefs.daily.summary.receive.updates</name>
<value>true</value>
</preference>
</preferences>
Add a new preference right at the end before the closing </preferences>
tag, so that it looks something like this:
<preferences>
<!--
<preference type="Long">
<name>user.issues.per.page</name>
<value>20</value>
</preference>
-->
<preference type="String">
<name>confluence.prefs.email.mimetype</name>
<value>text/html</value>
</preference>
<preference type="Boolean">
<name>confluence.prefs.email.notify</name>
<value>true</value>
</preference>
<preference type="Boolean">
<name>confluence.prefs.notify.on.new.followers</name>
<value>true</value>
</preference>
<preference type="Boolean">
<name>confluence.prefs.email.show.diff</name>
<value>true</value>
</preference>
<preference type="Boolean">
<name>confluence.prefs.email.show.full.content</name>
<value>true</value>
</preference>
<preference type="Boolean">
<name>confluence.prefs.watch.my.own.content</name>
<value>true</value>
</preference>
<preference type="Boolean">
<name>confluence.prefs.daily.summary.receive.updates</name>
<value>true</value>
</preference>
<preference type="String">
<name>confluence.user.time.zone</name>
<value>America/Los_Angeles</value>
</preference>
</preferences>
2. Restart Confluence
Did it work?
Try to create a new user, and login using that user. Check whether their timezone is set according to the default set earlier.