Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
TimeZone Problem
Jacky88
We are using BIRT for reporting in our application. When we tested the reports on local end, it was working as expected. Then we deployed the application on test server where OS is ubuntu and we are using mysql as our database server. Now the timezone of both OS and mysql are set to IST. But when we generate the report, it shows date/time before 5:30 hours i.e. GMT time. Any suggestions please?
Find more posts tagged with
Comments
mcremer
<blockquote class='ipsBlockquote' data-author="'Jacky88'" data-cid="83885" data-time="1318239314" data-date="10 October 2011 - 02:35 AM"><p>
We are using BIRT for reporting in our application. When we tested the reports on local end, it was working as expected. Then we deployed the application on test server where OS is ubuntu and we are using mysql as our database server. Now the timezone of both OS and mysql are set to IST. But when we generate the report, it shows date/time before 5:30 hours i.e. GMT time. Any suggestions please?<br /></p></blockquote>
<br />
Well its a java thing.<br />
<br />
Java takes the local of your OS. So if you want to run it make sure the macine your running the java on is set to the same local (trough boot options or setting the OS to it).<br />
<br />
If you do not want to do that. You can use some start up parameters or script it in your report.
Jacky88
<blockquote class='ipsBlockquote' data-author="'mcremer'" data-cid="83899" data-time="1318250856" data-date="10 October 2011 - 05:47 AM"><p>
Well its a java thing.<br />
<br />
Java takes the local of your OS. So if you want to run it make sure the macine your running the java on is set to the same local (trough boot options or setting the OS to it).<br />
<br />
If you do not want to do that. You can use some start up parameters or script it in your report.<br /></p></blockquote>
<br />
Thanx, Mcremer, for the reply.But my OS, mysql and jboss all r set to use IST .Still the problem exist.<br />
Also, i have tried setting the BIRT_viewer_timezone in the web.xml to "IST" but even that was of no use.<br />
<br />
Can u help me out.<br />
<br />
Thanx in advance.
mcremer
<blockquote class='ipsBlockquote' data-author="'Jacky88'" data-cid="83925" data-time="1318312443" data-date="10 October 2011 - 10:54 PM"><p>
Thanx, Mcremer, for the reply.But my OS, mysql and jboss all r set to use IST .Still the problem exist.<br />
Also, i have tried setting the BIRT_viewer_timezone in the web.xml to "IST" but even that was of no use.<br />
<br />
Can u help me out.<br />
<br />
Thanx in advance.<br /></p></blockquote>
<br />
<br />
Try somting like:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
nl_NL = new Packages.java.util.Locale("nl","NL");
dfd = new Packages.java.text.SimpleDateFormat("dd-MM-yyyy",nl_NL);
dfd.format(BirtDateTime.today());
</pre>