projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37e385a
)
TimeZone.php
author
leon
<leon@roojs.com>
Tue, 3 Oct 2023 03:11:48 +0000
(11:11 +0800)
committer
leon
<leon@roojs.com>
Tue, 3 Oct 2023 03:11:48 +0000
(11:11 +0800)
TimeZone.php
patch
|
blob
|
history
diff --git
a/TimeZone.php
b/TimeZone.php
index
c773801
..
d17ac94
100644
(file)
--- a/
TimeZone.php
+++ b/
TimeZone.php
@@
-93,7
+93,14
@@
class Pman_Core_TimeZone extends Pman
static function getOffset($timezone)
{
-
+ self::getTimezones();
+
+ // invalid timezone
+ if(!isset(self::$timezones[$timezone])) {
+ return '';
+ }
+
+ $offset = substr(self::$timezones[$timezone], 0, 1) == '-' ? self::$timezones[$timezone] : '+' . self::$timezones[$timezone]
}
static function getDisplayArea($timezone)