1--TEST--
2DatePeriod: Test getter
3--INI--
4date.timezone=UTC
5--FILE--
6<?php
7$start = new DateTime('2000-01-01 00:00:00', new DateTimeZone('Europe/Berlin'));
8$end   = new DateTime('2000-01-31 00:00:00', new DateTimeZone('UTC'));
9$interval = new DateInterval('P1D');
10$period   = new DatePeriod($start, $interval, $end);
11
12var_dump($period->getStartDate()->format('Y-m-d H:i:s'));
13var_dump($period->getStartDate()->getTimeZone()->getName());
14
15var_dump($period->getEndDate()->format('Y-m-d H:i:s'));
16var_dump($period->getEndDate()->getTimeZone()->getName());
17
18var_dump($period->getDateInterval()->format('%R%y-%m-%d-%h-%i-%s'));
19?>
20--EXPECTF--
21string(19) "2000-01-01 00:00:00"
22string(13) "Europe/Berlin"
23string(19) "2000-01-31 00:00:00"
24string(3) "UTC"
25string(12) "+0-0-1-0-0-0"
26