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

index 9db0d0c..d3c56d1 100644 (file)
@@ -127,4 +127,14 @@ 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