TimeZone.php
authorleon <leon@roojs.com>
Fri, 27 Oct 2023 05:27:18 +0000 (13:27 +0800)
committerleon <leon@roojs.com>
Fri, 27 Oct 2023 05:27:18 +0000 (13:27 +0800)
TimeZone.php

index d3c56d1..3d54ad1 100644 (file)
@@ -108,6 +108,16 @@ class Pman_Core_TimeZone extends Pman
 
         return self::$timezones;
     }
+
+    static function toRegion($tz)
+    {
+        return explode('/', $tz)[0];
+    }
+
+    static function toArea($tz)
+    {
+        return explode('/', $tz)[1];
+    }
     
     static function toTimeOffset($dt, $tz)
     {
@@ -127,14 +137,4 @@ class Pman_Core_TimeZone extends Pman
         $ar = explode('/', $tz);
         return $ar[0] . '/' . self::toDisplayArea($dt, $tz);
     }
-
-    static function toRegion($tz)
-    {
-        return explode('/', $tz)[0];
-    }
-
-    static function toArea($tz)
-    {
-        return explode('/', $tz)[1];
-    }
 }
\ No newline at end of file