Confluence Dashboard Fails to Display Due to Incorrect Timezone

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

tip/resting Created with Sketch.

This KB applies to older versions of Confluence, 4.x or lower. Confluence 5.x and up should not run into this problem.


Confluence displays the following error message, when user requests a page:

2010-03-22 09:29:12,164 ERROR [http-9090-5|http-9090-5] [confluence.util.velocity.VelocityUtils] getRenderedTemplate Error occurred rendering template: com/atlassian/confluence/plugins/macros/advanced/recentupdate/themes/concise/macro-template.vm
-- url: /createrssfeed.action \| userName: admin \| action: createrssfeed
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getFormattedDate' in  class com.atlassian.confluence.plugins.macros.advanced.recentupdate.ContentUpdateItem threw exception org.joda.time.IllegalFieldValueException: Value 0 for hourOfDay is not supported: Illegal instant due to time zone offset transition: 2010-03-22T00:59:12.058 (Asia/Tehran) at /com/atlassian/confluence/plugins/macros/advanced/recentupdate/themes/concise/updates.vm[line 10, column 51]
...
Caused by: org.joda.time.IllegalFieldValueException: Value 0 for hourOfDay is not supported: Illegal instant due to time zone offset transition: 2010-03-22T00:59:12.058 (Asia/Tehran)
at org.joda.time.chrono.ZonedChronology$ZonedDateTimeField.set(ZonedChronology.java:469)
at org.joda.time.DateTime.withTime(DateTime.java:472)
at com.atlassian.confluence.core.datetime.FriendlyDateFormatter.isYesterday(FriendlyDateFormatter.java:92)
at com.atlassian.confluence.core.datetime.FriendlyDateFormatter.getFormatMessage(FriendlyDateFormatter.java:75)

And:

2010-03-22 09:38:43,443 ERROR http-9090-5 confluence.util.velocity.VelocityUtils getRenderedTemplate Error occurred rendering template: com/atlassian/confluence/plugins/macros/dashboard/pagelist-with-profile-pics.vm
– url: /dashboard.action | userName: pmassenet | action: dashboard
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getFormatMessage' in class com.atlassian.confluence.core.datetime.FriendlyDateFormatter threw exception org.joda.time.IllegalFieldValueException: Value 0 for hourOfDay is not supported: Illegal instant due to time zone offset transition: 2010-03-22T00:08:43.081 (Asia/Tehran) at com/atlassian/confluence/plugins/macros/dashboard/pagelist-with-profile-pics.vmline 66, column 70
...
Caused by: org.joda.time.IllegalFieldValueException: Value 0 for hourOfDay is not supported: Illegal instant due to time zone offset transition: 2010-03-22T00:08:43.081 (Asia/Tehran)
at org.joda.time.chrono.ZonedChronology$ZonedDateTimeField.set(ZonedChronology.java:469)
at org.joda.time.DateTime.withTime(DateTime.java:472)
at com.atlassian.confluence.core.datetime.FriendlyDateFormatter.isYesterday(FriendlyDateFormatter.java:92)

Cause

The issue is due to an invalid timezone mapping in the Joda time library used by Confluence. If the System TimeZone is set to MET (Middle European Timezone) it is mapped to Iran/Tehran.

Resolution

Set the Time Zone to CET (Central European Timezone) as opposed to MET, you can set it at a JVM level by passing in -Duser.timezone=CET. Atlassian recommends setting the System Timezone to CET as opposed to MET.

In either case, a server restart is required for the changes to take effect.

Last modified on Nov 14, 2018

Was this helpful?

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