]> git.localhorst.tv Git - l2e.git/blobdiff - scripts/issues.php
improved issues script and added wiki script
[l2e.git] / scripts / issues.php
index 2e6c6b181a5d19e50010c94be3c24d04ab061c49..5d210aaa8bac5221b470e67a5feafe351754f3c0 100755 (executable)
@@ -199,6 +199,11 @@ function writeTicket(CSVReader $csv, $filename) {
                        array("\r\n", "\r", "\n"), array("\n", "\n", PHP_EOL), $description)));
        fputs($file, $description.PHP_EOL);
        fclose($file);
+       $updated = DateTime::createFromFormat(
+                       'm/d/Y h:i a', // 01/03/2013 05:56 am
+                       $csv->getNamed('Updated'),
+                       new DateTimeZone('Europe/Berlin'))->getTimestamp();
+       touch($filename, $updated);
 }
 
 $dir = dirname(dirname(__FILE__)).'/issues';
@@ -229,7 +234,7 @@ while ($csv->next()) {
                        'm/d/Y h:i a', // 01/03/2013 05:56 am
                        $csv->getNamed('Updated'),
                        new DateTimeZone('Europe/Berlin'))->getTimestamp();
-       if ($updated > ($modified - 60)) {
+       if ($updated > $modified) {
                echo 'updating: ', $filename, PHP_EOL;
                writeTicket($csv, $filepath);
        }