From 87c68e9d3135f56479f1938990970297771c4e48 Mon Sep 17 00:00:00 2001 From: leon Date: Fri, 27 Oct 2023 13:27:18 +0800 Subject: [PATCH] TimeZone.php --- TimeZone.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/TimeZone.php b/TimeZone.php index d3c56d1c..3d54ad19 100644 --- a/TimeZone.php +++ b/TimeZone.php @@ -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 -- 2.39.2