You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Edward Dening (JIRA)" <de...@myfaces.apache.org> on 2010/03/23 14:19:27 UTC

[jira] Created: (TRINIDAD-1763) Trinidad convertDateTime ignoring Daylight Savings

Trinidad convertDateTime ignoring Daylight Savings
--------------------------------------------------

                 Key: TRINIDAD-1763
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1763
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Components
    Affects Versions:  1.0.11-core
         Environment: windows and unix same problem
            Reporter: Edward Dening


We have an issue showing the correct date / time using the trinidad convertDateTime component. It seems to an issue with the daylight savings which is ignored. If we have a date outside of daylight savings such as '22/03/2009 00:00:00' it shows it correctly as '22/03/2009 00:00:00'. If we set a date inside of daylight savings '22/09/2009 00:00:00' it shows the previous day '21/09/2009 23:00:00'. 

We had an issue where the trinidad inputDate component was displaying the wrong date when you selected a date with the date picker. To fix this issue we set the time zone that trinidad uses to be UTC (in trinidad-config.xml time-zone value). This seems to have had a knock on effect by ignoring daylight savings and causing dates to fail by subtracting an hour from the time. We are using trinidad 1.0.11 which we are constrained to use by the framework we are using. 

Does anyone have any suggestions how to fix this? 

Input

DateChecker.reportDate1 = '22/03/2009 00:00:00' 
DateChecker.reportDate2 = '22/09/2009 00:00:00' 

Where reportDate1 and reportDate2 are Date objects 

Trinidad components

<tr:inputText id="reportDate1" readOnly="true" label="Report Date 1: " 
 value="#{DateChecker.reportDate1}"> 
         <tr:convertDateTime pattern="dd/MM/yyyy HH:mm:ss" /> 
</tr:inputText> 

<tr:inputText id="reportDate2" readOnly="true" label="Report Date 2: " 
value="#{DateChecker.reportDate2}"> 
         <tr:convertDateTime pattern="dd/MM/yyyy HH:mm:ss" /> 
</tr:inputText> 

Page Output

Report Date 1: '22/03/2009 00:00:00'
Report Date 2: '21/09/2009 23:00:00'


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.