TimeZone.php
authorleon <leon@roojs.com>
Mon, 15 Apr 2024 07:02:45 +0000 (15:02 +0800)
committerleon <leon@roojs.com>
Mon, 15 Apr 2024 07:02:45 +0000 (15:02 +0800)
TimeZone.php

index 870be60..6875b74 100644 (file)
@@ -241,25 +241,23 @@ class Pman_Core_TimeZone extends Pman
             'display_name' => $displayArea
         ));
 
-        if($ce->find(true)) {
-
+        if(!$ce->find(true)) {
+            return $displayArea . ' ' . $displayOffset;
         }
-        if($ce->find(true)) {
-            $ct = DB_DataObject::factory('core_templatestr');
-            $ct->setFrom(array(
-                'lang' => $lang,
-                'on_table' => 'core_enum',
-                'on_id' => $ce->id,
-                'on_col' => 'display_name',
-                'active' => 1
-            ));
-
-            if($ct->find(true) && !empty($ct->txt)) {
-                r
-            }
+
+        $ct = DB_DataObject::factory('core_templatestr');
+        $ct->setFrom(array(
+            'lang' => $lang,
+            'on_table' => 'core_enum',
+            'on_id' => $ce->id,
+            'on_col' => 'display_name',
+            'active' => 1
+        ));
+        if(!$ct->find(true) || empty($ct->txt)) {
+            return $displayArea . ' ' . $displayOffset;
         }
 
-        return str_replace('_', ' ', self::toArea($tz)) . ' (GMT ' . self::toTimeOffset($dt,$tz) . ')';
+        return $ct->txt . ' ' . $displayOffset;
 
     }