public static function DatexObject::getTzObject in Datex 7.2
Makes sure a tz is object, Not string ID of it.
2 calls to DatexObject::getTzObject()
- DatexObject::setTimezone in datex_api/
datex_api.class.inc - Sets Time Zone of internal date object.
- DatexObject::xobjectFromDate in datex_api/
datex_api.class.inc - Creates a DateTime object containing date extracted from $date.
File
- datex_api/
datex_api.class.inc, line 222 - Provides an API to work with dates.
Class
- DatexObject
- Base class for localized DateTime.
Code
public static function getTzObject($tz = NULL) {
return is_string($tz) ? new DateTimeZone($tz) : $tz;
}