[TYPO3-core] RFC #7626: Date/time handling is completely broken in 4.2

Steffen Kamper steffen at sk-typo3.de
Mon Feb 25 00:32:21 CET 2008


"Steffen Kamper" <steffen at sk-typo3.de> schrieb im Newsbeitrag 
news:mailman.1.1203894809.31325.typo3-team-core at lists.netfielders.de...
>
> "Martin Kutschker" <martin.kutschker-n0spam at no5pam-blackbox.net> schrieb 
> im Newsbeitrag 
> news:mailman.1.1203874504.17230.typo3-team-core at lists.netfielders.de...
>> Steffen Kamper schrieb:
>>> "Steffen Kamper" <steffen at sk-typo3.de> schrieb im Newsbeitrag 
>>> news:mailman.1.1203858793.4788.typo3-team-core at lists.netfielders.de...
>>>
>>>> there is one problem left. When you enter date in a datefield in my 
>>>> case the
>>>> date moves backward one day, because it's subtract 2 hours from 
>>>> midnight. I
>>>> will look how to prevent any time conversion with date(only) fields.
>>>>
>>>> vg  Steffen
>>>>
>>>
>>> i solved this problem with attached patch.
>>> I completely removed UTC for dates. Only with times it is used for 
>>> offset calculation.
>>
>> Yeu set the server TZ in bakend.php (=> frame "_top"). Please keep in 
>> mind that alt_doc.php may open in a popup and has no "top". IIRC much JS 
>> code is duplicated in alt_main.php and alt_doc.php for that reason. Maybe 
>> we could change all "top.property" to "mainWin.property" and define this 
>> like that "mainWin = top ? top : opener;"
>>
>> Anyway, this cannot be right:
>>
>> $d = date('O'); // ±HHMM
>> $minutes = substr($d,1,2)*60 + substr($d,3,2);
>> $serverTimezoneOffset = intval(substr($d,0,1) + $minutes);
>>
changed to

 //calculate Servers Timezone
$timeZone = date('O');  // server timezone in this format: ±HHMM
$minutes = intval(substr($timeZone,1,2))*60 + intval(substr($timeZone,3,2));
$sign = intval(substr($timeZone,0,1).'1');
$serverTimezoneOffset = $sign * $minutes;

vg  Steffen 




More information about the TYPO3-team-core mailing list