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

Timezone in Input Control and Reports


AndreC

Recommended Posts

Hello,

I am having some issues with the timezones.

Here is the situation;

The database is hosted on AWS and is set to UTC. The Jasperserver is also running on AWS and system time is also UTC.

At login to JasperServer I do specify the timezne using the drop down list (timezoneIds).

I have then created an Input Control that make a database query filtering on dates. The dates could be a range or 'today' which translate to CURRENT_DATE, or 'yesterday' ...

If I work in UTC time than it seem to all work.

If I select a different timezone then things gets mixed.

ScreenShot2014-01-15at23_21_40.png.2fc086f1f4f741e6e112782d36b39c07.png

In the debug logs (jasperserver.log)

2014-01-16 02:28:03,090 DEBUG JRJdbcQueryExecuter,pool-4-thread-2:396 - Parameter #2 (dateRange of type java.lang.String): today
2014-01-16 02:28:03,090 DEBUG JRJdbcQueryExecuter,pool-4-thread-2:396 - Parameter #3 (startDateStr of type java.lang.String): 2014-01-16 02:27 EST
2014-01-16 02:28:03,091 DEBUG JRJdbcQueryExecuter,pool-4-thread-2:396 - Parameter #4 (dateRange of type java.lang.String): today
2014-01-16 02:28:03,091 DEBUG JRJdbcQueryExecuter,pool-4-thread-2:396 - Parameter #5 (endDateStr of type java.lang.String): 2014-01-16 02:27 EST
 
The problem is that the user expect that the dates he entered are local to whatever timezone he specified at login, which is  EST, what we see here is the date get converted but then the time become wrong as it has the wrong timezone associated to the new time it seem.
 
I have tried to also set the timezone to UTC in the datasource (JDBC with oracle.jdbc.OracleDriver) and still does not seem to match
 
 
Basically how to configure the server such that international clients can connect using their local timezone and have all date converted properly?
Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

While there seem to be some sort of convertions for the date specified in the control as date type, how to tell oracle that I want the "current_time" or "sysdate" to apply the user specified timezone?

so if the user is in EST and specify 'today' that the system convert the 00:00 to 05:00 such that the query filter on the converted UTC time as the database is set.

 

I'know i am confusing but im not sure how to explain..

Link to comment
Share on other sites

  • 2 months later...
  • 7 years later...

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...