xref: /PHP-8.2/ext/date/tests/bug73460-001.phpt (revision 091c0920)
1--TEST--
2Bug #73460 (Datetime add not realising it already applied DST change)
3--FILE--
4<?php
5$date = new DateTime('2016-11-05 23:45:00', new DateTimeZone('America/New_York'));
6
7foreach (range(1, 20) as $i) {
8	echo $date->format('Y/m/d H:i e T'), "\n";
9
10	$date->add(new DateInterval('PT15M'));
11}
12?>
13--EXPECT--
142016/11/05 23:45 America/New_York EDT
152016/11/06 00:00 America/New_York EDT
162016/11/06 00:15 America/New_York EDT
172016/11/06 00:30 America/New_York EDT
182016/11/06 00:45 America/New_York EDT
192016/11/06 01:00 America/New_York EDT
202016/11/06 01:15 America/New_York EDT
212016/11/06 01:30 America/New_York EDT
222016/11/06 01:45 America/New_York EDT
232016/11/06 01:00 America/New_York EST
242016/11/06 01:15 America/New_York EST
252016/11/06 01:30 America/New_York EST
262016/11/06 01:45 America/New_York EST
272016/11/06 02:00 America/New_York EST
282016/11/06 02:15 America/New_York EST
292016/11/06 02:30 America/New_York EST
302016/11/06 02:45 America/New_York EST
312016/11/06 03:00 America/New_York EST
322016/11/06 03:15 America/New_York EST
332016/11/06 03:30 America/New_York EST
34