|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Re: [jira] Created: (TRINIDAD-1621) dateSelection does select wrong date when selecting date with daylight-saving time when current date has no daylight-saving timeHi Mike,
Could you run the demo for chooseDate or inputDate, and paste the html source for the 2 Oct 2009 link? I ran the choosedate demo with your specified scenario, i.e. - windows timezone = Europe/Berlin - current date=29 Oct 2009 - trinidad.config xml has time-zone param = Europe/Berlin I get the following HTML source for the 2 Oct 2009 link: return _calsd('idp1',1254434400000, 120) This does not match the values you mentioned. I also tried selecting 2 Oct 2009, and 2 Oct 2009 is populated into the input field, which I would expect. Yee-Wah Mike Toggweiler (JIRA) wrote: > 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? > > |
|
|
[jira] Created: (TRINIDAD-1621) dateSelection does select wrong date when selecting date with daylight-saving time when current date has no daylight-saving timedateSelection 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. |
|
|
[jira] Commented: (TRINIDAD-1621) dateSelection does select wrong date when selecting date with daylight-saving time when current date has no daylight-saving time[ https://issues.apache.org/jira/browse/TRINIDAD-1621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12774287#action_12774287 ] Mike Toggweiler commented on TRINIDAD-1621: ------------------------------------------- The following workaround fixed the problem: function _getLocaleTimeZoneDifference2(a0,a1) { - var a2=a0.getTimezoneOffset()*-1; - var a3=0; - if(a1!=void(0)) - a3=(a1-a2)*60*1000; - else if(_uixLocaleTZ!=(void(0))) - a3=(_uixLocaleTZ-a2)*60*1000; - return a3; + return 0; } > 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. |
| Free embeddable forum powered by Nabble | Forum Help |