Added feature #13192: Allow different timestamp as optional parameter in constructor...
authorChristian Kuhn <lolli@schwarzbu.ch>
Sun, 17 Jan 2010 16:44:59 +0000 (16:44 +0000)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 17 Jan 2010 16:44:59 +0000 (16:44 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6802 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/scheduler/class.tx_scheduler_croncmd.php

index 510e2a5..fd7ce5d 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-01-17  Christian Kuhn  <lolli@schwarzbu.ch>
+
+       * Added feature #13192: Allow different timestamp as optional parameter in constructor of class tx_scheduler_croncmd
+
 2010-01-17  Benjamin Mack  <benni@typo3.org>
 
        * Fixed bug #13093: Massuploader: Window is not closable (Thanks to Steffen Gebert)
index c02ad76..68734f7 100644 (file)
@@ -73,15 +73,18 @@ class tx_scheduler_CronCmd {
         * Constructor
         *
         * @param       string          $cmd: the cron command
+        * @param       integer         $tstamp: optional start time
         * @return      void
         */
-       public function __construct($cmd) {
+       public function __construct($cmd, $tstamp = FALSE) {
                        // Explode cmd in sections
                $this->cmd_sections = t3lib_div::trimExplode(' ', $cmd);
 
                        // Initialize the values with the starting time
                        // This takes care that the calculated time is always in the future
-               $tstamp = strtotime('+1 minute');
+               if ($tstamp === FALSE) {
+                       $tstamp = strtotime('+1 minute');
+               }
                $this->values = array(
                                // Minute
                        intval(date('i', $tstamp)),