[TYPO3-core] RFC: #10186: Time shifting (again) in datetime fields (followup to Bug#8746)
Ernesto Baschny [cron IT]
ernst at cron-it.de
Mon Jan 19 20:20:36 CET 2009
This is an SVN patch request.
Type: Bugfix (critical before 4.2.4 release!)
Bugtracker reference:
http://bugs.typo3.org/view.php?id=10186
Branches: TYPO3-4_2 and trunk
Problem(s):
After fix for #8746, the behaviour from bug#7897 was re-introduced.
Solution:
See attached patch. The newly introduced method
convertClientTimestampToUTC() was calculating the offset to UTC using a
incorrect reference date (the offset to UTC changes if the reference
date is in DST). "timestamp" send to the method is a timestamp in
seconds, while javascript "new Date(int)" expects a timestamp in
milliseconds.
How-to-reproduce:
Use the extension "user_datetest" for testing (see bug#8746).
Test the following:
1) create empty new record
2) click on checkbox near "date/time" field to get current date+time (we
are not in DST yet).
3) change date to some date after the DST-switch (so some day in summer,
say in June-2009).
4) move focus away:
- expected: date time to stay as entered
- buggy: time shifts back 1 or 2 hours (if your client is in a region
where DST applies and you are currently not in DST).
Now apply the patch and try it out again. Note: As the .js file is
changed, you need to force your browser to reload them after patching
(SHIFT-reload on Firefox, CTRL-reload on IE).
Cheers,
Ernesto
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug-10186-timezone.diff
Type: text/x-diff
Size: 585 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20090119/c54427ad/attachment.diff
More information about the TYPO3-team-core
mailing list