[TYPO3-core] RFC: bug #7897: Datetime saving across DST switches shifts time

Moreno Feltscher moreno.feltscher at gmail.com
Fri Apr 11 15:22:36 CEST 2008


+1 by testing.

Thanks for this important fix Ernesto!

On Tue, Apr 8, 2008 at 8:37 PM, Jeff Segars <jsegars at alumni.rice.edu> wrote:
> Ernesto Baschny [cron IT] wrote:
>
> > REMINDER #2, this is a particular awful bug that should be fixed before
> > RC2. So please review or OBJECT, else I will commit it "as is" on
> > wednesday...
> >
> > Steffen Kamper wrote: on 05.04.2008 21:55:
> >> REMINDER
> >>
> >> as this is imho a critical bug please test this patch, it's a must fix
> >> for final and should be in the next RC.
> >>
> >> thx, vg Steffen
> >>
> >> "Ernesto Baschny [cron IT]" <ernst at cron-it.de> schrieb im Newsbeitrag
> >> news:mailman.1.1207133843.5049.typo3-team-core at lists.netfielders.de...
> >>> This is a SVN patch request.
> >>>
> >>> Problem:
> >>> On fields of type "datetime" and "date", if you set a date in future or
> >>> past that is in a different DST (daylight saving time) condition than
> >>> your browser currently is (either you are in DST and the date you want
> >>> to set is not, or the other way around), the stored date (displayed in
> >>> the List-view) is different from the date displayed in the BE-edit form.
> >>>
> >>> It is shifted by 1 hour or by 1 day, e.g if you are in DST and the date
> >>> you want to set is not in DST.
> >>>
> >>>
> >>> Solution:
> >>> When storing and handling the time information in javascript and in
> >>> outputting it we currently normalize the information to UTC-time. The
> >>> bug was that we were assuming the the offset to UTC is always the same.
> >>> This is of course wrong: When client switches to DST the offset to UTC
> >>> either grows or shrinks by 60 minutes. So to calculate the UTC time, we
> >>> need to get the "offset to UTC" of the date we are trying to store and
> >>> not use "today" as a base of the calculation.
> >>>
> >>> The change has to be done on server side (server converting stored local
> >>> time to UTC time) and on client side (javascript converting local input
> >>> date to UTC time). Attached patch does that.
> >>>
> >>>
> >>> Branches: TYPO3_4-2  (critical bug!!)
> >>>
> >>>
> >>> Bugtracker reference:
> >>> http://bugs.typo3.org/view.php?id=7897
>
> +1 based on testing.
>
> _______________________________________________
> Before posting to this list, please have a look to the posting rules
> on the following websites:
>
> http://typo3.org/teams/core/core-mailinglist-rules/
> http://typo3.org/development/bug-fixing/diff-and-patch/
> _______________________________________________
> TYPO3-team-core mailing list
> TYPO3-team-core at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-core
>


More information about the TYPO3-team-core mailing list