mirror of
https://github.com/php/php-src.git
synced 2024-12-03 06:44:07 +08:00
16 lines
344 B
PHP
16 lines
344 B
PHP
--TEST--
|
|
Bug #66836 (DateTime::createFromFormat 'U' with pre 1970 dates fails parsing)
|
|
--INI--
|
|
date.timezone=Europe/Berlin
|
|
--FILE--
|
|
<?php
|
|
foreach (['-1', '-86400', '-1000000'] as $timestamp) {
|
|
$dt = DateTime::createFromFormat('U', $timestamp);
|
|
var_dump($dt->format('U') === $timestamp);
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
bool(true)
|
|
bool(true)
|
|
bool(true)
|