mirror of
https://github.com/php/php-src.git
synced 2024-10-04 00:06:16 +00:00
5b2ce47f2e
- Fixed bug #52062 (large timestamps with DateTime::getTimestamp and DateTime::setTimestamp). - Fixed bug #51994 (date_parse_from_format is parsing invalid date using 'yz' format). - Fixed bug #51223 (Seg fault while creating (by unserialization) DatePeriod).
38 lines
612 B
PHP
38 lines
612 B
PHP
--TEST--
|
|
Bug #51994 (date_parse_from_format is parsing invalid date using 'yz' format)
|
|
--FILE--
|
|
<?php
|
|
$trans_date = '10153'; // 152nd day of year 2010 -> 03.06.2010
|
|
$a_date = date_parse_from_format('yz', $trans_date);
|
|
var_dump($a_date);
|
|
?>
|
|
--EXPECTF--
|
|
array(12) {
|
|
["year"]=>
|
|
int(2010)
|
|
["month"]=>
|
|
int(6)
|
|
["day"]=>
|
|
int(3)
|
|
["hour"]=>
|
|
bool(false)
|
|
["minute"]=>
|
|
bool(false)
|
|
["second"]=>
|
|
bool(false)
|
|
["fraction"]=>
|
|
bool(false)
|
|
["warning_count"]=>
|
|
int(0)
|
|
["warnings"]=>
|
|
array(0) {
|
|
}
|
|
["error_count"]=>
|
|
int(0)
|
|
["errors"]=>
|
|
array(0) {
|
|
}
|
|
["is_localtime"]=>
|
|
bool(false)
|
|
}
|