Project

General

Profile

Bug #23055 ยป 14944-befunc-datetime.patch

Administrator Admin, 2010-06-30 14:04

View differences:

t3lib/class.t3lib_befunc.php (working copy)
* @param integer Time stamp, seconds
* @return string Formatted time
*/
public static function datetime($value) {
return date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'].' '.$GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $value);
public static function datetime($tstamp) {
return date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] .' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $tstamp);
}
/**
typo3/class.file_list.inc (working copy)
$theData[$field]=strtoupper($theFile['fileext']);
break;
case 'tstamp':
$theData[$field]=Date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $theFile['tstamp']);
$theData[$field] = t3lib_BEfunc::date($theFile['tstamp']);
break;
case 'file':
$theData[$field]= $this->linkWrapDir($title,$path);
......
$theData[$field]=strtoupper($theFile[$field]);
break;
case 'tstamp':
$theData[$field]=Date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $theFile[$field]);
$theData[$field] = t3lib_BEfunc::date($theFile[$field]);
break;
case '_CLIPBOARD_':
$temp = '';
typo3/mod/tools/em/class.em_index.php (working copy)
<input type="submit" value="' . $GLOBALS['LANG']->getLL('retrieve_update') .
'" onclick="' . htmlspecialchars($onCLick) . '" />';
if (is_file(PATH_site.'typo3temp/extensions.xml.gz')) {
$dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'];
$timeFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'];
$content .= ' ' . sprintf($GLOBALS['LANG']->getLL('ext_list_last_updated') . ' ',
date(
$dateFormat . ', ' . $timeFormat,
filemtime(PATH_site . 'typo3temp/extensions.xml.gz')
)
t3lib_BEfunc::datetime(filemtime(PATH_site . 'typo3temp/extensions.xml.gz'))
);
}
}
......
.'&nbsp;<label for="checkDisplayFiles">'.$LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:display_files').'</label>';
$this->content .= $this->doc->section($LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:header_upd_ext'), $content, 0, 1);
$dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'];
$timeFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'];
$content = sprintf($GLOBALS['LANG']->getLL('note_last_update_new'),
date(
$dateFormat . ', ' . $timeFormat,
filemtime(PATH_site . 'typo3temp/extensions.xml.gz')
)
t3lib_BEfunc::datetime(filemtime(PATH_site . 'typo3temp/extensions.xml.gz'))
) . '<br />';
}
typo3/show_item.php (working copy)
$config = $GLOBALS['TCA'][$table]['columns'][$field]['config'];
switch($config['type']) {
case 'input':
if (isset($config['checkbox']) && $content==$config['checkbox']) {$content=''; break;}
if (t3lib_div::inList($config['eval'],'date')) {$content = Date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'],$content); }
if (isset($config['checkbox']) && $content==$config['checkbox']){
$content='';
break;
}
if (t3lib_div::inList($config['eval'], 'date')) {
$content = t3lib_BEfunc::date($content);
}
break;
case 'group':
break;
typo3/sysext/belog/mod/index.php (working copy)
if (!$this->theTime) {
$this->MOD_SETTINGS['manualdate'] = '';
} else {
$this->MOD_SETTINGS['manualdate'] = date($this->dateFormat, $this->theTime);
$this->MOD_SETTINGS['manualdate'] = t3lib_BEfunc::datetime($this->theTime);
}
}
......
if (!$this->theTime_end) {
$this->MOD_SETTINGS['manualdate_end'] = '';
} else {
$this->MOD_SETTINGS['manualdate_end'] = date($this->dateFormat, $this->theTime_end);
$this->MOD_SETTINGS['manualdate_end'] = t3lib_BEfunc::datetime($this->theTime_end);
}
}
}
......
$this->content.= $this->doc->section(
$GLOBALS['LANG']->getLL('overview'),
sprintf($GLOBALS['LANG']->getLL('timeInfo'),
date($this->dateFormat, $starttime),
date($this->dateFormat, $endtime)) .
t3lib_BEfunc::datetime($starttime),
t3lib_BEfunc::datetime($endtime)) .
'<br /><br /><br />' . implode('<br />', $overviewList),
1, 1, 0
);
......
$this->content .= $this->doc->section(
sprintf($GLOBALS['LANG']->getLL('logForNonPageRelatedActionsOrRootLevelOrPage'),
$insertMsg,
date($this->dateFormat, $starttime),
date($this->dateFormat, $endtime)
t3lib_BEfunc::datetime($starttime),
t3lib_BEfunc::datetime($endtime)
),
'', 1, 1, 0
);
typo3/sysext/beuser/mod/index.php (working copy)
$outTable .= '
<tr class="bgColor4" height="17" valign="top">' .
'<td nowrap="nowrap">' .
date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'].' '.$GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $session['ses_tstamp']) .
t3lib_BEfunc::datetime($session['ses_tstamp']) .
'</td>' .
'<td nowrap="nowrap">' .
'<span'.$hostName.'>'.$ip.'</span>' .
typo3/sysext/recycler/classes/view/class.tx_recycler_view_deletedRecords.php (working copy)
'uid' => $row['uid'],
'pid' => $row['pid'],
'table' => $table,
'crdate' => date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $row[$GLOBALS['TCA'][$table]['ctrl']['crdate']]),
'tstamp' => date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $row[$GLOBALS['TCA'][$table]['ctrl']['tstamp']]),
'crdate' => t3lib_BEfunc::datetime($row[$GLOBALS['TCA'][$table]['ctrl']['crdate']]),
'tstamp' => t3lib_BEfunc::datetime($row[$GLOBALS['TCA'][$table]['ctrl']['tstamp']]),
'owner' => $feuser['username'],
'owner_uid' => $row[$GLOBALS['TCA'][$table]['ctrl']['cruser_id']],
'tableTitle' => tx_recycler_helper::getUtf8String(
typo3/sysext/scheduler/mod1/index.php (working copy)
$message = $GLOBALS['LANG']->getLL('msg.incompleteLastRun');
$severity = t3lib_FlashMessage::WARNING;
} else {
$startDate = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $lastRun['start']);
$startDate = t3lib_BEfunc::date($lastRun['start']);
$startTime = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $lastRun['start']);
$endDate = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], $lastRun['end']);
$endDate = t3lib_BEfunc::date($lastRun['end']);
$endTime = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $lastRun['end']);
$label = 'automatically';
if ($lastRun['type'] == 'manual') {
......
* @return string table of waiting schedulings
*/
protected function listTasks() {
// Define display format for dates
$dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'];
$content = '';
// Get list of registered classes
......
// Assemble information about last execution
$context = '';
if (!empty($schedulerRecord['lastexecution_time'])) {
$lastExecution = date($dateFormat, $schedulerRecord['lastexecution_time']);
$lastExecution = t3lib_BEfunc::datetime($schedulerRecord['lastexecution_time']);
if ($schedulerRecord['lastexecution_context'] == 'CLI') {
$context = $GLOBALS['LANG']->getLL('label.cron');
} else {
......
$nextDate = '-';
}
else {
$nextDate = date($dateFormat, $schedulerRecord['nextexecution']);
$nextDate = t3lib_BEfunc::datetime($schedulerRecord['nextexecution']);
if (empty($schedulerRecord['nextexecution'])) {
$nextDate = $GLOBALS['LANG']->getLL('none');
} elseif ($schedulerRecord['nextexecution'] < $GLOBALS['EXEC_TIME']) {
typo3/template.php (working copy)
function formatTime($tstamp,$type) {
$dateStr = '';
switch($type) {
case 1: $dateStr = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'],$tstamp);
break;
case 10: $dateStr = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'],$tstamp);
break;
case 1:
$dateStr = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'], $tstamp);
break;
case 10:
$dateStr = t3lib_BEfunc::date($tstamp);
break;
}
return $dateStr;
}
    (1-1/1)