Jump to content
We've recently updated our Privacy Statement, available here ×

Time showing wrong in report in JasperServer


kaptnk207

Recommended Posts

I have a simple report that lists events from our production execution system.  Just noticed recently that the times shown in the report when run from JasperServer are 1 hour out from the same report run in iReport.

Guess its some sort of timezone problem, but don't know where to look.

The datasource is an Oracle 8i JDBC driver configured as a JNDI data source, service name=jdbc/pts, time zone=Europe/London - Greenwich Mean Time.

JNDI resource configured in jasperserver/META-INF/context.xml as shown below:

<Resource name="jdbc/pts" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="xxxx" password="xxxx" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@pts:1521:PTS" />

The report criteria is:

  and date_transaction >= to_date('$P!{START_DATE} 01:00:00','dd-mm-yyyy hh24:mi:ss')
  and date_transaction <  to_date('$P!{START_DATE} 06:00:00','dd-mm-yyyy hh24:mi:ss')

From the web browser my locale is en_GB and my time zone is Europe/London - Greenwich Mean Time.

If I run it from iReport a line will say 01-08-2008 01:17 BST but the same line will say 01-08-2008 00:17 BST if I run it from the browser.  All other data is exactly the same.

I've tried removing the time zone from the JNDI data source, but this makes no difference.

Any ideas?


 

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

First test was to take away the time zone setting from the JNDI data sources as you suggested.  Also restarted Tomcat and it worked perfectly.  No more problems.  Thanks for the advice.

Now looks like JasperServer will become our standard reporting tool.  Not bad for something that you can get free...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...