Jump to content
  • How to enable/disable the time zone adjustment in date/time input controls


    Friendly User
    • Features: Input Controls Product: JasperReports® Server

    Scenario:

    In TIBCO JasperReports® Server when you provide a timestamp in a date/time input control, the time stamp that is sent by the server to the database gets adjusted relatively to the difference between the user session time zone and the server time zone itself. How to disable this behavior or enable it for other date inputs?


    Solution:

    To change this behavior, edit the applicationContext-formatting.xml file in {JRS WAR}/WEB-INF location:

    <util:map id="applyClientTimezoneFormatting"
              key-type="java.lang.String"
              value-type="java.lang.Boolean">
        <entry key="java.util.Date" value="false"/>
        <entry key="java.sql.Date" value="false"/>
        <entry key="java.sql.Timestamp" value="true"/>
        <entry key="java.sql.Time" value="true"/>
    </util:map>

    By default time and timestamp type controls get the adjustment and date types doesn't. To turn off the behavior, set it to false, and to enable - to true.

    You will need to restart the server after the change.


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