1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/date/tests/bug32555.phpt
Nikita Popov cdc4e49b84 Make strftime tests musl compatible
* Remove usage of strftime() in favor of date() in cases where
   we are not specifically testing strftime(). We implement
   date() ourselves, and as such are insulated from implementation-
   defined behavior.
 * Add skipif for broken strftime() %Z support. We have decided
   not to work around the issue for musl using manual expansion,
   as people should not be using this function anyway, and it is
   slated for future deprecation.
 * Don't test strftime() with invalid format specifier. The
   behavior is implementation-dependent.
2020-08-13 12:02:27 +02:00

18 lines
475 B
PHP

--TEST--
Bug #32555 (strtotime("tomorrow") can return false)
--INI--
date.timezone=US/Eastern
--FILE--
<?php
$stamp = 1112427000;
print date('r', strtotime('now',$stamp)) ."\n";
print date('r', strtotime('tomorrow',$stamp)) ."\n";
print date('r', strtotime('+1 day',$stamp)) ."\n";
print date('r', strtotime('+2 day',$stamp)) ."\n";
?>
--EXPECT--
Sat, 02 Apr 2005 02:30:00 -0500
Sun, 03 Apr 2005 00:00:00 -0500
Sun, 03 Apr 2005 03:30:00 -0400
Mon, 04 Apr 2005 02:30:00 -0400