From: Alan Date: Mon, 16 Oct 2023 04:20:31 +0000 (+0800) Subject: add Timezone X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=00f28d9bf5805af98453cf1eb66da1232ae6b813;hp=976d54e7b28d381b97cb49aed15365ae5db8d45b;p=Pman.Core add Timezone --- 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'