xref: /PHP-7.4/ext/date/tests/bug32555.phpt (revision 782352c5)
1--TEST--
2Bug #32555 (strtotime("tomorrow") can return false)
3--SKIPIF--
4<?php
5if (substr(PHP_OS, 0, 3) == 'WIN') die('skip strftime uses system TZ');
6?>
7--INI--
8date.timezone=US/Eastern
9--FILE--
10<?php
11$stamp = 1112427000;
12print strftime('%c %Z',strtotime('now',$stamp)) ."\n";
13print strftime('%c %Z',strtotime('tomorrow',$stamp)) ."\n";
14print strftime('%c %Z',strtotime('+1 day',$stamp)) ."\n";
15print strftime('%c %Z',strtotime('+2 day',$stamp)) ."\n";
16?>
17--EXPECT--
18Sat Apr  2 02:30:00 2005 EST
19Sun Apr  3 00:00:00 2005 EST
20Sun Apr  3 03:30:00 2005 EDT
21Mon Apr  4 02:30:00 2005 EDT
22