The Datetime Zone ID is not Recognised
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
Symptoms
Error messages where macros should be rendering.
The following appears in the atlassian-confluence.log
:
Caused by: java.lang.IllegalArgumentException: The datetime zone id is not recognised: SystemV/CST6CDT
at org.joda.time.DateTimeZone.forTimeZone(DateTimeZone.java:310)
at com.atlassian.confluence.core.datetime.FriendlyDateFormatter.isYesterday(FriendlyDateFormatter.java:91)
at com.atlassian.confluence.core.datetime.FriendlyDateFormatter.getFormatMessage(FriendlyDateFormatter.java:75)
The error is preceded by the following error:
Caused by:
java.lang.RuntimeException: Error rendering template for decorator root
at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:232)
caused by: java.lang.RuntimeException: Error rendering template for decorator page
at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:232)
caused by: java.lang.RuntimeException: Error rendering template for decorator root
at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:232)
caused by: java.lang.RuntimeException: Error rendering template for decorator comments
at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:232)
caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'formatFriendlyDate' in class com.atlassian.confluence.pages.actions.ViewPageAction threw exception java.lang.IllegalArgumentException: The datetime zone id is not recognised: SystemV/CST6CDT @ /decorators/components/comments.vmd[44,29]
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:286)
caused by: java.lang.IllegalArgumentException: The datetime zone id is not recognised: SystemV/CST6CDT
at org.joda.time.DateTimeZone.forTimeZone(DateTimeZone.java:310)
Confluence may also log errors such as this:
ERROR [http-8090-3] [confluence.util.velocity.VelocityUtils] getRenderedTemplate Error occurred rendering template: com/atlassian/confluence/plugins/macros/advanced/recentupdate/themes/concise/macro-template.vm
-- url: /display/test/test+page | page: 950275 | userName: admin | referer: http://localhost:8090/ | action: viewpage
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getFormattedDate' in class com.atlassian.confluence.plugins.macros.advanced.recentupdate.ContentUpdateItem threw exception java.lang.IllegalArgumentException: The datetime zone id 'SystemV/EST5' is not recognised at /com/atlassian/confluence/plugins/macros/advanced/recentupdate/themes/concise/updates.vm[line 15, column 29]
at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223)
Caused by: java.lang.IllegalArgumentException: The datetime zone id 'SystemV/EST5' is not recognised
at org.joda.time.DateTimeZone.forTimeZone(DateTimeZone.java:365)
- Accessing a space with a Default Theme will produce the error above. Other Confluence themes (eg. Clickr, Left Navigation) are not affected.
- This is known to affect the recently updated macro to display "500 Internal Server" error message in red box.
Causes
- Java detects the default system timezone is incorrectly set. For example, the system is configured for a region (eg. "US/Pacific"), however Java reports it as something else (eg. "SystemV/CST6CDT").
- In the Sun's bug report, it was found that
/etc/localtime
in the tester's environment was no longer a link. Changing the link to a symbolic link to "/usr/share/zoneinfo/US/Pacific" allowed Java to work correctly again. - A macro is looking to convert the date using the timezone supplied to by the jdk, but the jdk does not recognize the timezone.
- It was found that this issue can also be caused by the usage of the cache plugin macro together with Team Calendars for Confluence. It is suggested to disable this plugin to troubleshoot this issue if necessary.
Resolution
There are two resolutions:
- Add
-Duser.timezone=<YourTimeZone>
to the jvm arguments as described here: Configuring System Properties.
List of supported timezones: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
OR Change
/etc/localtime
to a symbolic link againAfter making the change, restart Confluence