DATETIMEZONE(3) 1 DATETIMEZONE(3)The DateTimeZone classINTRODUCTION
Representation of time zone.
CLASS SYNOPSIS
DateTimeZone
DateTimeZone
Constants
o const integer$DateTimeZone::AFRICA1
o const integer$DateTimeZone::AMERICA2
o const integer$DateTimeZone::ANTARCTICA4
o const integer$DateTimeZone::ARCTIC8
o const integer$DateTimeZone::ASIA16
o const integer$DateTimeZone::ATLANTIC32
o const integer$DateTimeZone::AUSTRALIA64
o const integer$DateTimeZone::EUROPE128
o const integer$DateTimeZone::INDIAN256
o const integer$DateTimeZone::PACIFIC512
o const integer$DateTimeZone::UTC1024
o const integer$DateTimeZone::ALL2047
o const integer$DateTimeZone::ALL_WITH_BC4095
o const integer$DateTimeZone::PER_COUNTRY4096
Methods
o public DateTimeZone::__construct (string $timezone)
o public array DateTimeZone::getLocation (void )
o public string DateTimeZone::getName (void )
o public int DateTimeZone::getOffset (DateTime $datetime)
o public array DateTimeZone::getTransitions ([int $timestamp_begin], [int $timestamp_end])
o publicstatic array DateTimeZone::listAbbreviations (void )
o publicstatic array DateTimeZone::listIdentifiers NULL ([int $what = DateTimeZone::ALL], [string $country])
PREDEFINED CONSTANTS
o DateTimeZone::AFRICA -Africa time zones.
o DateTimeZone::AMERICA -America time zones.
o DateTimeZone::ANTARCTICA -Antarctica time zones.
o DateTimeZone::ARCTIC -Arctic time zones.
o DateTimeZone::ASIA -Asia time zones.
o DateTimeZone::ATLANTIC -Atlantic time zones.
o DateTimeZone::AUSTRALIA -Australia time zones.
o DateTimeZone::EUROPE -Europe time zones.
o DateTimeZone::INDIAN -Indian time zones.
o DateTimeZone::PACIFIC -Pacific time zones.
o DateTimeZone::UTC -UTC time zones.
o DateTimeZone::ALL -All time zones.
o DateTimeZone::ALL_WITH_BC -All time zones including backwards compatible.
o DateTimeZone::PER_COUNTRY -Time zones per country.
PHP Documentation Group DATETIMEZONE(3)
Check Out this Related Man Page
DATETIME(3) 1 DATETIME(3)The DateTime classINTRODUCTION
Representation of date and time.
CLASS SYNOPSIS
DateTime
DateTimeDateTimeInterface
Constants
o const string$DateTime::ATOM"Y-m-dTH:i:sP"
o const string$DateTime::COOKIE"l, d-M-Y H:i:s T"
o const string$DateTime::ISO8601"Y-m-dTH:i:sO"
o const string$DateTime::RFC822"D, d M y H:i:s O"
o const string$DateTime::RFC850"l, d-M-y H:i:s T"
o const string$DateTime::RFC1036"D, d M y H:i:s O"
o const string$DateTime::RFC1123"D, d M Y H:i:s O"
o const string$DateTime::RFC2822"D, d M Y H:i:s O"
o const string$DateTime::RFC3339"Y-m-dTH:i:sP"
o const string$DateTime::RSS"D, d M Y H:i:s O"
o const string$DateTime::W3C"Y-m-dTH:i:sP"
Methods
o public DateTime::__construct NULL ([string $time = "now"], [DateTimeZone $timezone])
o public DateTime DateTime::add (DateInterval $interval)
o publicstatic DateTime DateTime::createFromFormat (string $format, string $time, [DateTimeZone $timezone])
o publicstatic array DateTime::getLastErrors (void )
o public DateTime DateTime::modify (string $modify)
o publicstatic DateTime DateTime::__set_state (array $array)
o public DateTime DateTime::setDate (int $year, int $month, int $day)
o public DateTime DateTime::setISODate (int $year, int $week, [int $day = 1])
o public DateTime DateTime::setTime (int $hour, int $minute, [int $second])
o public DateTime DateTime::setTimestamp (int $unixtimestamp)
o public DateTime DateTime::setTimezone (DateTimeZone $timezone)
o public DateTime DateTime::sub (DateInterval $interval)
o public DateInterval DateTime::diff (DateTimeInterface $datetime2, [bool $absolute = false])
o public string DateTime::format (string $format)
o public int DateTime::getOffset (void )
o public int DateTime::getTimestamp (void )
o public DateTimeZone DateTime::getTimezone (void )
o public DateTime::__wakeup (void )
PREDEFINED CONSTANTS
o DateTime::ATOM - DATE_ATOM - Atom (example: 2005-08-15T15:52:01+00:00)
o DateTime::COOKIE - DATE_COOKIE - HTTP Cookies (example: Monday, 15-Aug-2005 15:52:01 UTC)
o DateTime::ISO8601 - DATE_ISO8601 - ISO-8601 (example: 2005-08-15T15:52:01+0000)
o DateTime::RFC822 - DATE_RFC822 - RFC 822 (example: Mon, 15 Aug 05 15:52:01 +0000)
o DateTime::RFC850 - DATE_RFC850 - RFC 850 (example: Monday, 15-Aug-05 15:52:01 UTC)
o DateTime::RFC1036 - DATE_RFC1036 - RFC 1036 (example: Mon, 15 Aug 05 15:52:01 +0000)
o DateTime::RFC1123 - DATE_RFC1123 - RFC 1123 (example: Mon, 15 Aug 2005 15:52:01 +0000)
o DateTime::RFC2822 - DATE_RFC2822 - RFC 2822 (example: Mon, 15 Aug 2005 15:52:01 +0000)
o DateTime::RFC3339 - DATE_RFC3339 - Same as DATE_ATOM (since PHP 5.1.3)
o DateTime::RSS - DATE_RSS - RSS (example: Mon, 15 Aug 2005 15:52:01 +0000)
o DateTime::W3C - DATE_W3C - World Wide Web Consortium (example: 2005-08-15T15:52:01+00:00)
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.5.0 | |
| | |
| | The class now implements DateTimeInterface. |
| | |
|5.4.24 | |
| | |
| | The COOKIE constant was changed to reflect RFC |
| | 1036 using a four digit year rather than a two |
| | digit year (RFC 850) as prior versions. |
| | |
| 5.2.2 | |
| | |
| | DateTime object comparison with the comparison |
| | operators changed to work as expected. Previ- |
| | ously, all DateTime objects were considered equal |
| | (using ==). |
| | |
+--------+---------------------------------------------------+
PHP Documentation Group DATETIME(3)