Time zone localization in Jasper Server - solution

Jaspersoft Community 'Read-Only' as of July 8, 2022

Transition to New TIBCO Community Just Weeks Away

You can still search, review wiki content, and review discussions in read-only mode. Please email community@tibco.com with questions or issues requiring TIBCO review or response.

This is not a question but an answer to one which a number of people have asked: namely how to localise reports in Jasper Server with respect to time zone

I have written a wiki page about it. I can't seem to link directly to it here, but if you go to the wiki, click How-To in the common searches and then search for time zone localization you should find it

 

Hope it is useful

toddbrook's picture
520
Joined: Oct 1 2010 - 6:16am
Last seen: 5 years 1 week ago

2 Answers:

djohnson53's picture
153578
Joined: May 25 2012 - 11:10am
Last seen: 5 months 5 days ago

Just a small note that can help other people reading the article posted above. Under the section 3. Setting the user’s time zone it is written following by the author:

"The value provided here gets set as the REPORT_TIME_ZONE parameter. 

It might be possible to set the user’s time zone when logging in via some SSO mechanism but I have not investigated this."

If you are making the build yourself from the source code, you can override it from file jasperreports.properties located under: jasperserver\jasperserver-war\src\main\webappAdditions\WEB-INF\classes.

Just uncomment last line property net.sf.jasperreports.jdbc.time.zone and set your time zone instead of REPORT_TIME_ZONE value (use quotes to ensure unescaping): 

# use the report/user time zone to fetch values from databases
#net.sf.jasperreports.jdbc.time.zone=REPORT_TIME_ZONE
 
Example:
net.sf.jasperreports.jdbc.time.zone='Europe/Belgrade'
darkolakovic's picture
Joined: Dec 3 2015 - 7:50am
Last seen: 3 months 3 weeks ago
Feedback