[TYPO3-core] RFC: Bug #1697: Datetime input fields and timezone shift bug
Steffen Kamper
steffen at sk-typo3.de
Sun Oct 21 00:34:29 CEST 2007
"Martin Kutschker" <martin.kutschker-n0spam at no5pam-blackbox.net> schrieb im
Newsbeitrag
news:mailman.1.1192913786.32124.typo3-team-core at lists.netfielders.de...
> Steffen Kamper schrieb:
>> "Ingo Renner" <ingo at typo3.org> schrieb im Newsbeitrag
>> news:mailman.1.1192881462.27423.typo3-team-core at lists.netfielders.de...
>>> Ernesto Baschny [cron IT] wrote:
>>>
>>>> Problem:
>>>> Editing date, datetime, time and timesec fields in BE when you have an
>>>> offset between your clients timezone and the server timezone leads to
>>>> wrong information being stored.
>>> What's the intended behavior?
>>>
>>> Ingo
>>>
>>
>> Hi Ingo,
>>
>> intended behavior is date/time entering without client calculating of
>> local time. Best would be to have all date/time-values in UTC to decide
>> which local time to be displayed..
>> Best example is a calendar, where entries are made from different
>> timezones. So the JS is calculating the time with the client local time.
>
> I don't understand. The time displayed should be in the clients local
> time. OTOH the time stored should be independent from the clients time
> zone. Currently it is stored in the servers time zone, while UTC would
> have been a better choice.
>
> So what does the patch?
>
> Masi
Hi Masi,
the main point is this:
- change php time generation mktime => gmmktime to init with server setting
- in JS evaluating with UTC using the timezone offset
so evaluating in BE date / datetime fields are independent from client
timezone (because JS is executed in client browser) and uses server
timezone.
vg Steffen
More information about the TYPO3-team-core
mailing list