How do I change the default time zone for users in Confluence?

Still need help?

The Atlassian Community is here for you.

Ask the community

For Atlassian eyes only

This article is Not Validated and cannot be shared with customers.

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

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.

Last modified on Dec 19, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.