Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Timezone in report incorrect
richie.riviere
Hi,<br><br>
In some of my reports I use....<br><br>
<B>As at:</B> <VALUE-OF format="dd/MM/yy hh:mm:ss">BirtDateTime.now()</VALUE-OF><br><br>
I recently discovered it was giving me an incorrect time.I live in the Austrlalia/Sydney timezone and I have tried setting BIRT_VIEWER_TIMEZONE in my web.xml as both Austrlalia/Sydney and also GMT+11 but both don't seem to change the default timezone.<br><br>
Can someone help me with what I need to do to change birt reports to use the Australia/Sydney timezone?<br><br>
I am using BIRT 3.7.2.<br><br>
thanks
Find more posts tagged with
Comments
micajblock
<p>Is this in the designer? If yes, there is a setting in preferences for this. See image below (newer version but should be the same). If this is in your application, how are you deploying?</p>
richie.riviere
<p>thanks for that info. It is good and will fix my problem when previewing the report in eclipse.</p>
<p> </p>
<p>I still have an issue though because when I deploy my application the timezone will be wrong.</p>
<p> </p>
<p>The architecture of my web application is to integrate birt reports my web application by including all the birt engine jars inside my webcontent folder.</p>
<p> </p>
<p>All my BIRT report configuration is sitting inside my web.xml file. These are the two settings I would have thought I should set to get the BIRT timezone correct however changing these settings does not seem to be changing the result returned from BirtDateTime.now(). It is still returning the wrong timezone.</p>
<p> </p>
<p> <!-- Default locale setting. --><br>
<context-param><br>
<param-name>BIRT_VIEWER_LOCALE</param-name><br>
<param-value>en_AU</param-value><br>
</context-param><br><br>
<!--<br>
Default timezone setting.<br>
Examples: "Europe/Paris", "GMT+1".<br>
Defaults to the container's timezone. <br>
--><br>
<context-param><br>
<param-name>BIRT_VIEWER_TIMEZONE</param-name><br>
<param-value>GMT+10</param-value><br>
</context-param><br>
</p>
<p>Can you think of anything extra I might have to do or why this might not be working?</p>
<p> </p>
<p>thanks</p>
richie.riviere
A question for you Mica, with respect to the answer you previously gave me, will that change anything in each individual report? Or is that suggested solution you gave me specific to previewing the reports in eclipse? Ie. Will it have any effects on reports I am deploying in my application?<br><br>
Thanks
micajblock
<p>How are you deploying BIRT?</p>
richie.riviere
<p>I'm including all of the birt engine libraries inside my web application war file.</p>
micajblock
<p>Not my area of expertise, but the engine task has a setTimeZone method.</p>
richie.riviere
<p>Mica, thank you for spending the time to have a look at this problem for me.<br>
</p>
<p>Today I found out what my problem was. It was caused by me being very silly.</p>
<p> </p>
<p>As mentioned in my first post the expression I was using was....</p>
<p> </p>
<p><B>As at:</B> <VALUE-OF format="dd/MM/yy hh:mm:ss">BirtDateTime.now()</VALUE-OF></p>
<p> </p>
<p>It should have been...</p>
<p> </p>
<p><B>As at:</B> <VALUE-OF format="dd/MM/yy HH:mm:ss">BirtDateTime.now()</VALUE-OF></p>
<p> </p>
<p>This was totally confusing me. But it was the cause of my problem. I did not have to set anything inside BIRT_VIEWER_TIMEZONE which is consistent with what I've read. i.e. if you do not set anything for this value then birt should inherit the timezone of your JVM.</p>