Jump to content
We've recently updated our Privacy Statement, available here ×
  • Make timestamps returned from database stay in server timezone, but adjust report rendering timestamp to user's timezone


    ghudson_1
    • Product: JasperReports® Library

    Issue Description

    Someone might want timestamp-based values from their database use a specific timezone, like the server timezone for example, but they might have report-rendering timestamps (for example a "ran on" value in a title or summary) that they'd like to show in the user's timezone.

    Resolution

    You can specify a timezone adjustment at an element level via this property:

    http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.pattern.timezone

    If you're using JRS and wanted to specify the user's timezone defined for them during login you'd set the element to REPORT_TIME_ZONE.  Select the field in your report design in Jaspersoft Studio, then in the Properties panel select Advanced > Misc > Properties. Add new property with name: net.sf.jasperreports.pattern.timezone and value: REPORT_TIME_ZONE


    User Feedback

    Recommended Comments

    There are no comments to display.



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