Commit 51eb7d28 authored by Manfred Kutas's avatar Manfred Kutas

ZP-1112 Get timezone from Z-Push or system if it's empty for

getMSTZnameFromTZName.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 04a25dda
......@@ -1209,6 +1209,12 @@ class TimezoneUtil {
* @return string
*/
static private function getMSTZnameFromTZName($name) {
// if $name is empty, get the timezone from system
if (trim($name) == '') {
$name = date_default_timezone_get();
ZLog::Write(LOGLEVEL_INFO, sprintf("TimezoneUtil::getMSTZnameFromTZName(): empty timezone name sent. Got timezone from the system: '%s'", $name));
}
foreach (self::$mstzones as $mskey => $msdefs) {
if ($name == $msdefs[0])
return $msdefs[1];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment