From 00f28d9bf5805af98453cf1eb66da1232ae6b813 Mon Sep 17 00:00:00 2001 From: Alan Date: Mon, 16 Oct 2023 12:20:31 +0800 Subject: [PATCH] add Timezone --- TimeZone.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/TimeZone.php b/TimeZone.php index 4e2901fa..69a3e571 100644 --- a/TimeZone.php +++ b/TimeZone.php @@ -71,15 +71,19 @@ class Pman_Core_TimeZone extends Pman } $ce = DB_DataObject::factory('core_enum'); - $ce->query(' + $ce->query(" SELECT - *, TIME_FORMAT(TIMEDIFF(NOW(), CONVERT_TZ(NOW(), Name, "UTC")), "%H:%i") as timeOffset + *, TIME_FORMAT(TIMEDIFF(NOW(), CONVERT_TZ(NOW(), Name, 'UTC')), '%H:%i') as timeOffset FROM mysql.time_zone_name + WHERE + Name NOT LIKE '%/%' + AND + NAME NOT LIKE 'Etc%' ORDER BY timeoffset DESC, Name DESC - '); + "); while($ce->fetch()) { // ignroe timezone such as 'CET' and 'America/Argentina/Buenos_Aires' -- 2.39.2