fixed timezone
This commit is contained in:
@@ -20,6 +20,13 @@ if (PHP_SAPI !== 'cli') {
|
||||
|
||||
date_default_timezone_set('Europe/Rome');
|
||||
|
||||
// --only-at=17 : esce senza fare nulla se in Italia non sono le 17 (server in UTC)
|
||||
foreach ($argv as $a) {
|
||||
if (preg_match('/^--only-at=(\d{1,2})$/', $a, $m) && (int) date('G') !== (int) $m[1]) {
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
$root = dirname(__DIR__);
|
||||
chdir($root);
|
||||
require_once $root . '/public/class/db-functions.php'; // include anche vendor/autoload.php
|
||||
|
||||
Reference in New Issue
Block a user