xref: /PHP-5.6/ext/date/tests/bug30532.phpt (revision e753493c)
1--TEST--
2Bug #30532 (strtotime - crossing daylight savings time)
3--INI--
4date.timezone=America/New_York
5--FILE--
6<?php
7
8echo date('Y-m-d H:i:s T', strtotime('2004-10-31 EDT +1 hour'))."\n";
9echo date('Y-m-d H:i:s T', strtotime('2004-10-31 EDT +2 hours'))."\n";
10echo date('Y-m-d H:i:s T', strtotime('2004-10-31 EDT +3 hours'))."\n";
11
12echo "\n";
13
14echo date('Y-m-d H:i:s T', strtotime('2004-10-31 +1 hour'))."\n";
15echo date('Y-m-d H:i:s T', strtotime('2004-10-31 +2 hours'))."\n";
16echo date('Y-m-d H:i:s T', strtotime('2004-10-31 +3 hours'))."\n";
17?>
18--EXPECT--
192004-10-31 01:00:00 EDT
202004-10-31 01:00:00 EST
212004-10-31 02:00:00 EST
22
232004-10-31 01:00:00 EDT
242004-10-31 02:00:00 EST
252004-10-31 03:00:00 EST
26