DateTimeZone::getLocation

(PHP 5 >= 5.3.0, PHP 7) Returns location information for a timezone public array DateTimeZone::getLocation ( void ) Object oriented style Procedural style array timezone_location_get ( DateTimeZone $object ) Returns location information for a timezone, including country code, latitude/longitude and comments. Parameters: object Procedural style only: A DateTimeZone obje

DateTimeZone::__construct

(PHP 5 >= 5.2.0, PHP 7) Creates new DateTimeZone object DateTimeZone timezone_open ( string $timezone ) Object oriented style public DateTimeZone::__construct ( string $timezone ) Procedural style Creates new DateTimeZone object. Parameters: timezone One of the supported timezone names. Returns: Returns DateTimeZone on success. Procedural sty

DateTime::__wakeup

(PHP 5 >= 5.2.0, PHP 7) The __wakeup handler public DateTime::__wakeup ( void ) public DateTimeImmutable::__wakeup ( void ) public DateTimeInterface::__wakeup ( void ) The __wakeup() handler. Returns: Initializes a DateTime object.

DateTime::getTimezone

(PHP 5 >= 5.2.0, PHP 7) Return time zone relative to given DateTime public DateTimeZone DateTime::getTimezone ( void ) Object oriented style public DateTimeZone DateTimeImmutable::getTimezone ( void ) public DateTimeZone DateTimeInterface::getTimezone ( void ) Procedural style DateTimeZone date_timezone_get ( DateTimeInterface $object ) Return time zone relative to given DateTime. Parameters:

DateTime::getTimestamp

(PHP 5 >= 5.3.0, PHP 7) Gets the Unix timestamp public int DateTime::getTimestamp ( void ) Object oriented style public int DateTimeImmutable::getTimestamp ( void ) public int DateTimeInterface::getTimestamp ( void ) Procedural style int date_timestamp_get ( DateTimeInterface $object ) Gets the Unix timestamp. Returns: Returns the Unix timestamp representing the date.

DateTime::getOffset

(PHP 5 >= 5.2.0, PHP 7) Returns the timezone offset public int DateTime::getOffset ( void ) Object oriented style public int DateTimeImmutable::getOffset ( void ) public int DateTimeInterface::getOffset ( void ) Procedural style int date_offset_get ( DateTimeInterface $object ) Returns the timezone offset. Parameters: object Procedural style only: A DateTime object r

DateTime::format

(PHP 5 >= 5.2.0, PHP 7) Returns date formatted according to given format public string DateTime::format ( string $format ) Object oriented style public string DateTimeImmutable::format ( string $format ) public string DateTimeInterface::format ( string $format ) Procedural style string date_format ( DateTimeInterface $object , string $format ) Returns date formatted according to given format. Parameter

DateTime::diff

(PHP 5 >= 5.3.0, PHP 7) Returns the difference between two DateTime objects public DateInterval DateTime::diff ( DateTimeInterface $datetime2 [, bool $absolute = false ] ) Object oriented style public DateInterval DateTimeImmutable::diff ( DateTimeInterface $datetime2 [, bool $absolute = false ] ) public DateInterval DateTimeInterface::diff ( DateTimeInterface $datetime2 [, bool $absolute = false ] ) Procedural style D

DateTimeImmutable::sub

(PHP 5 >= 5.5.0, PHP 7) Subtracts an amount of days, months, years, hours, minutes and seconds public DateTimeImmutable DateTimeImmutable::sub ( DateInterval $interval ) Like DateTime::sub() but works with DateTimeImmutable.

DateTimeImmutable::setTimezone

(PHP 5 >= 5.5.0, PHP 7) Sets the time zone public DateTimeImmutable DateTimeImmutable::setTimezone ( DateTimeZone $timezone ) Like DateTime::setTimezone() but works with DateTimeImmutable.