+2009-11-05 Francois Suter <francois@typo3.org>
+
+ * Feature #12215: Scheduler: Added display and information about usage of timezone
+
2009-11-05 Rupert Germann <rupi@gmx.li>
* Fixed bug #12466: PHP-5.3 Warning: strlen() expects parameter 1 to be string, array given
return $content;
}
+ /**
+ * Display the current server's time along with a help text about server time
+ * usage in the Scheduler
+ *
+ * @return string HTML to display
+ */
+ protected function displayServerTime() {
+ // Get the current time, formatted
+ $dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'] . ' T (e)';
+ $now = date($dateFormat);
+ // Display the help text
+ $serverTime = '<h4>' . $GLOBALS['LANG']->getLL('label.serverTime') . '</h4>';
+ $serverTime .= '<p>' . $GLOBALS['LANG']->getLL('msg.serverTimeHelp') . '</p>';
+ $serverTime .= '<p>' . sprintf($GLOBALS['LANG']->getLL('msg.serverTime'), $now) . '</p>';
+ return $serverTime;
+ }
+
/**
* Delete a task from the execution queue
*
$content .= '<input type="submit" name="save" class="button" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:save') . '" /> '
. '<input type="button" name="cancel" class="button" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:cancel') . '" onclick="document.location=\'' . $GLOBALS['MCONF']['_'] . '\'" />';
+ // Display information about server time usage
+ $content .= $this->displayServerTime();
+
return $content;
}
. '" /> ' . $GLOBALS['LANG']->getLL('action.add') . '</a></p>';
// Display legend, if there's at least one registered task
+ // Also display information about the usage of server time
if ($numRows > 0) {
- $content .= '<p class="status-legend">' . $GLOBALS['LANG']->getLL('status.legend') . ':</p>
+ $content .= '<h4>' . $GLOBALS['LANG']->getLL('status.legend') . '</h4>
<ul>
<li><img ' . t3lib_iconWorks::skinImg(t3lib_extMgm::extRelPath('scheduler'), 'res/gfx/status_failure.png') . ' alt="' . $GLOBALS['LANG']->getLL('status.failure') . '" /> ' . $GLOBALS['LANG']->getLL('status.legend.failure') . '</li>
<li><img ' . t3lib_iconWorks::skinImg(t3lib_extMgm::extRelPath('scheduler'), 'res/gfx/status_late.png') . ' alt="' . $GLOBALS['LANG']->getLL('status.late') . '" /> ' . $GLOBALS['LANG']->getLL('status.legend.late') . '</li>
<li><img ' . t3lib_iconWorks::skinImg(t3lib_extMgm::extRelPath('scheduler'), 'res/gfx/status_scheduled.png') . ' alt="' . $GLOBALS['LANG']->getLL('status.scheduled') . '" /> ' . $GLOBALS['LANG']->getLL('status.legend.scheduled') . '</li>
<li><img ' . t3lib_iconWorks::skinImg(t3lib_extMgm::extRelPath('scheduler'), 'res/gfx/status_disabled.png') . ' alt="' . $GLOBALS['LANG']->getLL('status.disabled') . '" /> ' . $GLOBALS['LANG']->getLL('status.legend.disabled') . '</li>
</ul>';
+ $content .= $this->displayServerTime();
}
<label index="label.nextExecution">Next Execution</label>
<label index="label.parallel">Parallel Execution</label>
<label index="label.parallel.long">Allow Parallel Execution</label>
+ <label index="label.serverTime">Server time</label>
<label index="label.sleepTime">Sleep time</label>
<label index="label.start">Start (HH:MM DD-MM-YYYY)</label>
<label index="label.type">Type</label>
<label index="msg.schedulerUserFound">The backend user "_cli_scheduler" was found.</label>
<label index="msg.schedulerUserFoundButDisabled">The backend user "_cli_scheduler" exists but is currently disabled.</label>
<label index="msg.schedulerUserMissing">The backend user "_cli_scheduler" was not found. <a href="%s" title="Click to create the missing user">Create the user now</a>.</label>
+ <label index="msg.serverTime">Current server time is %s.</label>
+ <label index="msg.serverTimeHelp">All dates and times in the Scheduler are measured according to the server's time, as the Scheduler is run purely on the server-side.</label>
<label index="msg.stop">Are you sure you want to mark this task as not running? Note that this will not stop the actual script (if unsure please refer to the manual).</label>
<label index="msg.stopError">The task could not be marked as non-running.</label>
<label index="msg.stopSuccess">The task was successfully marked as non-running.</label>
<label index="task_start.description">Enter a start date and time for the task</label>
<label index="task_start.details">
Date must be entered in a standard format like HH:mm dd-mm-YYYY or YYYY-mm-dd HH:mm. Natural keywords can also be used, like "now" or "tomorrow".
+ Date and time must correspond to the server's time zone.
</label>
<label index="task_end.alttitle">Start of task</label>
<label index="task_end.description">Enter an end date and time for the task, can be blank</label>
<label index="task_end.details">
Date must be entered in a standard format like HH:mm dd-mm-YYYY or YYYY-mm-dd HH:mm. Natural keywords can also be used, like "now" or "tomorrow".
+ Date and time must correspond to the server's time zone.
Can be left blank, if task is not supposed to end at any point.
</label>