Bug #18278 » time_bug_fix_7626_v3.diff
t3lib/class.t3lib_tceforms.php (working copy) | ||
---|---|---|
$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);
|
||
}
|
||
|
||
$PA['fieldChangeFunc'] = array_merge(array('typo3form.fieldGet'=>'typo3form.fieldGet('.$paramsList.');'), $PA['fieldChangeFunc']);
|
||
$mLgd = ($config['max']?$config['max']:256);
|
t3lib/jsfunc.evalfield.js (working copy) | ||
---|---|---|
} else {
|
||
year = this.getYear(today);
|
||
}
|
||
var month = (values.values[this.USmode?1:2])?this.parseInt(values.values[this.USmode?1:2]):today.getUTCMonth()+1;
|
||
var day = (values.values[this.USmode?2:1])?this.parseInt(values.values[this.USmode?2:1]):today.getUTCDate();
|
||
var month = (values.values[this.USmode?1:2])?this.parseInt(values.values[this.USmode?1:2]):today.getMonth()+1;
|
||
var day = (values.values[this.USmode?2:1])?this.parseInt(values.values[this.USmode?2:1]):today.getDate();
|
||
var theTime = new Date(parseInt(year), parseInt(month)-1, parseInt(day));
|
||
// Substract timezone offset from client
|
||
this.lastDate = this.getTimestamp(theTime);
|
||
theTime.setTime((this.lastDate - theTime.getTimezoneOffset()*60)*1000);
|
||
this.lastDate = this.getTimestamp(theTime);
|
||
}
|
||
this.lastDate+=add*24*60*60;
|
||
return this.lastDate;
|
||
... | ... | |
var theTime = new Date(this.getYear(today), today.getUTCMonth(), today.getUTCDate(), hour, min, ((type=="timesec")?sec:0));
|
||
this.lastTime = this.getTimestamp(theTime);
|
||
theTime.setTime((this.lastTime - theTime.getTimezoneOffset()*60)*1000);
|
||
theTime.setTime((this.lastTime - (theTime.getTimezoneOffset() + serverTimezoneOffset)*60)*1000);
|
||
this.lastTime = this.getTime(theTime);
|
||
}
|
||
this.lastTime+=add*60;
|
||
... | ... | |
if (!parseInt(value)) {return '';}
|
||
var theTime = new Date(parseInt(value) * 1000);
|
||
if (this.USmode) {
|
||
theString = (theTime.getUTCMonth()+1)+'-'+theTime.getUTCDate()+'-'+this.getYear(theTime);
|
||
theString = (theTime.getMonth()+1)+'-'+theTime.getDate()+'-'+this.getYear(theTime);
|
||
} else {
|
||
theString = theTime.getUTCDate()+'-'+(theTime.getUTCMonth()+1)+'-'+this.getYear(theTime);
|
||
theString = theTime.getDate()+'-'+(theTime.getMonth()+1)+'-'+this.getYear(theTime);
|
||
}
|
||
break;
|
||
case "datetime":
|
typo3/alt_doc.php (working copy) | ||
---|---|---|
$this->doc->docType = 'xhtml_trans';
|
||
$this->doc->form = '<form action="'.htmlspecialchars($this->R_URI).'" method="post" enctype="'.$GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'].'" name="editform" onsubmit="document.editform._scrollPosition.value=(document.documentElement.scrollTop || document.body.scrollTop); return TBE_EDITOR.checkSubmit(1);">';
|
||
|
||
//calculate Servers Timezone
|
||
$d = date('O');
|
||
$minutes = substr($d,1,2)*60 + substr($d,3,2);
|
||
$serverTimezoneOffset = intval(substr($d,0,1) + $minutes);
|
||
$this->doc->loadJavascriptLib('contrib/prototype/prototype.js');
|
||
$this->doc->JScode = $this->doc->wrapScriptTags('
|
||
// this is the timezone offset of the server
|
||
var serverTimezoneOffset = ' . $serverTimezoneOffset . ';
|
||
|
||
function jumpToUrl(URL,formEl) { //
|
||
if (!TBE_EDITOR.isFormChanged()) {
|
||
window.location.href = URL;
|
- « Previous
- 1
- 2
- 3
- Next »