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

Steffen Kamper steffen at sk-typo3.de
Fri Feb 22 23:04:43 CET 2008


"Martin Kutschker" <martin.kutschker-n0spam at no5pam-blackbox.net> schrieb im 
Newsbeitrag 
news:mailman.1.1203715870.12115.typo3-team-core at lists.netfielders.de...
> Steffen Kamper schrieb:
>>
>> There you see the intention:
>> - send UTC to the server
>
> Ok, but somewhere has to be then a conversion on the server from UTC to 
> server TZ. Where is this part?
>
> Masi

this should be the part: in t3lib_tceforms.php, line 1104

  if (isset($config['checkbox'])) {
    // Setting default "click-checkbox" values for eval types "date" and 
"datetime":
   $thisMidnight = gmmktime(0,0,0);
   if (in_array('date',$evalList)) {
    $checkSetValue = $thisMidnight;
   } elseif (in_array('datetime',$evalList)) {
    $checkSetValue = time();
   } elseif (in_array('year',$evalList)) {
    $checkSetValue = gmdate('Y');
   }
   $cOnClick = 
'typo3form.fieldGet('.$paramsList.',1,\''.$checkSetValue.'\');'.implode('',$PA['fieldChangeFunc']);
   $item.='<input type="checkbox"'.$this->insertDefStyle('check').' 
name="'.$PA['itemFormElName'].'_cb" 
onclick="'.htmlspecialchars($cOnClick).'" />';
  }
  if((in_array('date',$evalList) || in_array('datetime',$evalList)) && 
$PA['itemFormElValue']>0){
    // Add server timezone offset to UTC to our stored date
   $hoursOffset = date('O',$PA['itemFormElValue'])/100;
   $PA['itemFormElValue'] += ($hoursOffset*60*60);
  }


vg  Steffen





More information about the TYPO3-team-core mailing list