[TYPO3-core] RFC: #10186: Time shifting (again) in datetime fields (followup to Bug#8746)
Ingmar Schlecht
ingmar at typo3.org
Tue Jan 20 11:36:58 CET 2009
Thanks, Ernesto!
I have committed this after reviewing, so it gets into the release.
cheers
Ingmar
Ernesto Baschny [cron IT] schrieb:
> 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
>
>
>
--
Ingmar Schlecht
TYPO3 Core Developer
More information about the TYPO3-team-core
mailing list