projects
/
Pman.Core
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
TimeZone.php
[Pman.Core]
/
TimeZone.php
diff --git
a/TimeZone.php
b/TimeZone.php
index
0f109d7
..
2330614
100644
(file)
--- a/
TimeZone.php
+++ b/
TimeZone.php
@@
-109,6
+109,17
@@
class Pman_Core_TimeZone extends Pman
return self::$timezones;
}
+ function isValidTimeZone($tz) {
+ try {
+ new DateTimeZone($tz);
+ }
+ catch (Exception $e) {
+ return false;
+ }
+
+ return true;
+ }
+
static function toRegion($tz)
{
return explode('/', $tz)[0];