22 $tz = new \DateTimeZone($timezoneName);
23 $this->assertInstanceOf(
'DateTimeZone',
$tz);
25 if (strpos($e->getMessage(),
"Unknown or bad timezone") !==
false) {
26 $this->markTestSkipped($timezoneName .
' is not (yet) supported in this PHP version. Update pecl/timezonedb');
57 X-MICROSOFT-CDO-TZID:2
59 DTSTART:16010101T030000
62 RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU
65 DTSTART:16010101T020000
68 RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=-1SU
72 DTSTAMP:20120416T092149Z
73 DTSTART;TZID=
"foo":20120418T1
75 SUMMARY:Begin Unterhaltsreinigung
76 UID:040000008200E00074C5B7101A82E0080000000010DA091DC31BCD01000000000000000
77 0100000008FECD2E607780649BE5A4C9EE6418CBC
84 $ex = new \DateTimeZone(
'Europe/Lisbon');
86 $this->assertEquals($ex->getName(),
$tz->getName());
97 TZID:(GMT+01.00) Sarajevo/Warsaw/Zagreb
98 X-MICROSOFT-CDO-TZID:2
100 DTSTART:16010101T030000
103 RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU
110 $ex = new \DateTimeZone(
'Europe/Sarajevo');
112 $this->assertEquals($ex->getName(),
$tz->getName());
124 X-MICROSOFT-CDO-TZID:2000
126 DTSTART:16010101T030000
129 RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU
132 DTSTART:16010101T020000
135 RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=-1SU
139 DTSTAMP:20120416T092149Z
140 DTSTART;TZID=
"foo":20120418T1
142 SUMMARY:Begin Unterhaltsreinigung
143 UID:040000008200E00074C5B7101A82E0080000000010DA091DC31BCD01000000000000000
144 0100000008FECD2E607780649BE5A4C9EE6418CBC
145 DTEND;TZID=
"Sarajevo, Skopje, Sofija, Vilnius, Warsaw, Zagreb":20120418T103
152 $ex = new \DateTimeZone(date_default_timezone_get());
153 $this->assertEquals($ex->getName(),
$tz->getName());
160 $ex = new \DateTimeZone(
'America/New_York');
161 $this->assertEquals($ex->getName(),
$tz->getName());
171 $ex = new \DateTimeZone($tzid);
173 $this->assertEquals($ex->getName(),
$tz->getName());
183 $ex = new \DateTimeZone($tzid);
185 $this->assertEquals($ex->getName(),
$tz->getName());
196 \DateTimeZone::listIdentifiers()
217 if (version_compare(PHP_VERSION,
'5.5.10',
'>=') && !defined(
'HHVM_VERSION')) {
218 $ex = new \DateTimeZone(
'-04:00');
220 $ex = new \DateTimeZone(
'Etc/GMT-4');
222 $this->assertEquals($ex->getName(),
$tz->getName());
244 DTSTART:16010101T030000
247 RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU
250 DTSTART:16010101T020000
253 RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=-1SU
257 DTSTAMP:20120416T092149Z
258 DTSTART;TZID=
"foo":20120418T1
260 SUMMARY:Begin Unterhaltsreinigung
261 UID:040000008200E00074C5B7101A82E0080000000010DA091DC31BCD01000000000000000
262 0100000008FECD2E607780649BE5A4C9EE6418CBC
269 $ex = new \DateTimeZone(date_default_timezone_get());
270 $this->assertEquals($ex->getName(),
$tz->getName());
282 TZID:/freeassociation.sourceforge.net/Tzfile/Europe/Ljubljana
283 X-LIC-LOCATION:Europe/Ljubljana
286 DTSTART:19701028T030000
287 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10
293 DTSTART:19700325T020000
294 RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3
301 DTSTART;TZID=/freeassociation.sourceforge.net/Tzfile/Europe/Ljubljana:
303 DTEND;TZID=/freeassociation.sourceforge.net/Tzfile/Europe/Ljubljana:
308 CREATED:20121002T172613Z
309 LAST-MODIFIED:20121002T172613Z
317 $ex = new \DateTimeZone(
'Europe/Ljubljana');
318 $this->assertEquals($ex->getName(),
$tz->getName());
330 TZID:/freeassociation.sourceforge.net/Tzfile/SystemV/EST5EDT
331 X-LIC-LOCATION:SystemV/EST5EDT
334 DTSTART:19701104T020000
335 RRULE:FREQ=YEARLY;BYDAY=1SU;BYMONTH=11
341 DTSTART:19700311T020000
342 RRULE:FREQ=YEARLY;BYDAY=2SU;BYMONTH=3
348 UID:20121026T021107Z-6301-1000-1-0@chAir
349 DTSTAMP:20120905T172126Z
350 DTSTART;TZID=/freeassociation.sourceforge.net/Tzfile/SystemV/EST5EDT:
352 DTEND;TZID=/freeassociation.sourceforge.net/Tzfile/SystemV/EST5EDT:
358 CREATED:20121026T021108Z
359 LAST-MODIFIED:20121026T021118Z
360 X-EVOLUTION-MOVE-CALENDAR:1
366 $ex = new \DateTimeZone(
'America/New_York');
367 $this->assertEquals($ex->getName(),
$tz->getName());
375 $ex = new \DateTimeZone(
'America/New_York');
376 $this->assertEquals($ex->getName(),
$tz->getName());
static getIdentifiersBC()
This method returns an array of timezone identifiers, that are supported by DateTimeZone(), but not returned by DateTimeZone::listIdentifiers().
testTimezoneFail()
InvalidArgumentException
testWetherMicrosoftIsStillInsane()
static static getTimeZone($tzid, Component $vcalendar=null, $failIfUncertain=false)
This method will try to find out the correct timezone for an iCalendar date-time value.
testPrefixedOffsetExchangeIdentifier()
testTimeZoneBCIdentifiers($tzid)
getPHPTimeZoneBCIdentifiers
getPHPTimeZoneIdentifiers()
static loadTzMaps()
This method will load in all the tz mapping information, if it's not yet done.
testTimeZoneIdentifiers($tzid)
getPHPTimeZoneIdentifiers
getPHPTimeZoneBCIdentifiers()
static read($data, $options=0, $charset='UTF-8')
Parses a vCard or iCalendar object, and returns the top component.
testCorrectTZ($timezoneName)
getMapping