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

Ernesto Baschny [cron IT] ernst at cron-it.de
Thu Apr 3 14:18:44 CEST 2008


Hi,

REMINDER...

Any other comment on that? It is pretty "critical" to get that into 4.2, 
which according to the Roadmap will be released next tuesday. Is this 
information still up-to-date?

Cheers,
Ernesto

Ernesto Baschny [cron IT] wrote: on 02.04.2008 12:57:
> 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
> 


More information about the TYPO3-team-core mailing list