projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8cc6a55
)
sort the timezone
author
leon
<leon@roojs.com>
Tue, 7 Nov 2023 05:31:20 +0000
(13:31 +0800)
committer
leon
<leon@roojs.com>
Tue, 7 Nov 2023 05:31:20 +0000
(13:31 +0800)
TimeZone.php
patch
|
blob
|
history
diff --git
a/TimeZone.php
b/TimeZone.php
index
1d8629d
..
72a629f
100644
(file)
--- a/
TimeZone.php
+++ b/
TimeZone.php
@@
-86,8
+86,9
@@
class Pman_Core_TimeZone extends Pman
AND
Name NOT LIKE 'Etc%'
ORDER BY
- timeoffset DESC,
- Name DESC
+ SUBSTRING_INDEX(Name, '/', 1) ASC,
+ timeoffset ASC,
+ Name ASC
");
while($ce->fetch()) {
@@
-149,6
+150,10
@@
class Pman_Core_TimeZone extends Pman
return '';
}
+ if($dt == '0000-00-00 00:00:00' || $dt == '') {
+ $dt = 'NOW';
+ }
+
$date = new DateTime($dt, new DateTimeZone($tz));
return $date->format('P');
}