add timezone check to core system.
authorAlan <alan@roojs.com>
Mon, 31 Jul 2023 04:23:04 +0000 (12:23 +0800)
committerAlan <alan@roojs.com>
Mon, 31 Jul 2023 04:23:04 +0000 (12:23 +0800)
Config.php

index f5144bc..9357316 100644 (file)
@@ -21,7 +21,9 @@ class Pman_Core_Config {
     
     function init($ff, $cfg)
     {
-      
+        
+        
+        
         $cfg = $this->overlayDefaults($cfg);
         
         if (!empty($this->memory_limit)) {
@@ -31,8 +33,18 @@ class Pman_Core_Config {
             }
         
         }
+        
         $this->verifyExtensions();
         
+        
+        if (!isset($cfg['Pman']['timezone'])) {
+            die("timezone needs setting in Pman[timezone]");
+        }
+        if ($cfg['Pman']['timezone'] != ini_get('date.timezone')) {
+            die("timezone needs setting in php.ini date.timezone = " . $cfg['Pman']['timezone']);
+        }
+        
+        
         return $cfg;
     }