You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Ed Dening <ed...@hotmail.com> on 2010/03/15 10:55:41 UTC

Trinidad convertDateTime ignoring Daylight Savings

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 = ‘21/09/2009 23:00:00’.

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>

Output

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

-- 
View this message in context: http://old.nabble.com/Trinidad-convertDateTime-ignoring-Daylight-Savings-tp27902146p27902146.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.