theodan Posted May 31, 2009 Share Posted May 31, 2009 My JRXML has two java.util.Date params. JasperServer (or JasperReports) was adding a timezone offset to them, even though they already had timezone offsets applied to them. For example, 5/31/2009 00:00:00 CDT was becoming 5/30/2009 19:00:00 CDT when I printed the param in the JRXML using a <textFieldExpression>. I'm not sure if it was actually changing the underlying Date param object, or if it was just doing this when displaying its value. I was also using the param in my <queryString>, and I haven't done extensive testing to see if the query was using the correct or incorrect value. This was happening in all of my JRXML's except one. It took me a while to figure out why that one handled the Date params correctly, but I finally realized it was because it had: <queryString language="SQL"> instead of: <queryString> as the others did. So I'm not sure if this qualifies as a bug, and I didn't do extensive testing to see what happens when query languages other than SQL are specified. But I figured I should let someone know about it. -DanPost Edited by theodan at 05/31/2009 17:04 Link to comment Share on other sites More sharing options...
lucianc Posted June 3, 2009 Share Posted June 3, 2009 This is a bug, <query language="SQL"> should work in the same way as <query>.JS uses timezones for two different things.Data source timezones are used to adjust date/time values read from the DB; in the normal case this should not be required so the data source timezone would not be set.User timezones (as selected on the login screen) as used to display date/time values. This does not change the values themselves, just the way they are displayed.Regards,Lucian Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now