dateSelection does select wrong date when selecting date with daylight-saving 
time when current date has no daylight-saving time
--------------------------------------------------------------------------------------------------------------------------------

                 Key: TRINIDAD-1621
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1621
             Project: MyFaces Trinidad
          Issue Type: Bug
    Affects Versions:  1.2.12-core
            Reporter: Mike Toggweiler


The changes made in issue TRINIDAD-1349 aren't working in the case the 
dateInput is used in the following case:

- assume timezone is set to europe/berlin
- server and client time-zone are the same (local machine)
- actual date is the 29. october 2009
- we'd like to pick a date at the beginning of the month (i.e. 02.10.2009)
- daylight-saving time was changed at 25.10.2009
- the resulting date shown in the datefield is set to the 01.10.2009

debugging led me to the following problem:
The function _dfsv in DateField.js gets called with the selected date in millis 
(correctly, selecting 02.10.2009 leads to 1251842400000 seconds).  The 
_getLocaleTimeZoneDifference2 evaluates a difference of 1 hour because the 
selected date is in daylight-saving time, actual date is not. This gets 
calculated to the new date value which will be reduced to the midnight time and 
is after calling _dfGetMidnight set to 1251756000000 seonds. But this itself 
represents the 01.10.2009.

The following workaround fixes the problem:
- set the time-zone in trinidad-config.xml to GMT, this will eliminate 
time-zone offsets in selection dialog.

I didn't find a solution to the following question so far:
why at all will the date/time get adjusted to the local time-zone when 
selecting a date/time from a dialog? Even if there is a big difference in 
time-zone I'd like the time to have the value written into the datefield which 
i have selected, not the value adjusted to the actual server time-zone? 

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

Reply via email to