protected static function safeCreateDateTimeZone($object) { if ($object === null) { return new DateTimeZone(date_default_timezone_get()); } if ($object instanceof DateTimeZone) { return $object; } return new DateTimeZone($object); }