The DateTimeZone class
(PHP 5 >= 5.2.0, PHP 7)
Introduction
Representation of time zone.
Class synopsis
$timestamp_begin
= PHP_INT_MIN
[, int $timestamp_end
= PHP_INT_MAX
]] ) : array$what
= DateTimeZone::ALL
[, string $country
= NULL
]] ) : arrayPredefined Constants
DateTimeZone::AFRICA
-
Africa time zones.
DateTimeZone::AMERICA
-
America time zones.
DateTimeZone::ANTARCTICA
-
Antarctica time zones.
DateTimeZone::ARCTIC
-
Arctic time zones.
DateTimeZone::ASIA
-
Asia time zones.
DateTimeZone::ATLANTIC
-
Atlantic time zones.
DateTimeZone::AUSTRALIA
-
Australia time zones.
DateTimeZone::EUROPE
-
Europe time zones.
DateTimeZone::INDIAN
-
Indian time zones.
DateTimeZone::PACIFIC
-
Pacific time zones.
DateTimeZone::UTC
-
UTC time zones.
DateTimeZone::ALL
-
All time zones.
DateTimeZone::ALL_WITH_BC
-
All time zones including backwards compatible.
DateTimeZone::PER_COUNTRY
-
Time zones per country.
Table of Contents
- DateTimeZone::__construct — Creates new DateTimeZone object
- DateTimeZone::getLocation — Returns location information for a timezone
- DateTimeZone::getName — Returns the name of the timezone
- DateTimeZone::getOffset — Returns the timezone offset from GMT
- DateTimeZone::getTransitions — Returns all transitions for the timezone
- DateTimeZone::listAbbreviations — Returns associative array containing dst, offset and the timezone name
- DateTimeZone::listIdentifiers — Returns a numerically indexed array containing all defined timezone identifiers
English translation
You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.
Thank you in advance.
Document created the 30/01/2003, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/php-rf-class.datetimezone.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.