@@ -507,17 +507,17 @@ public function testParseTimestampAsDateTimeObject($yaml, $year, $month, $day, $
507
507
$ expected = new \DateTime ($ yaml );
508
508
$ expected ->setTimeZone (new \DateTimeZone ('UTC ' ));
509
509
$ expected ->setDate ($ year , $ month , $ day );
510
- $ expected ->setTime ($ hour , $ minute , $ second );
510
+ @ $ expected ->setTime ($ hour , $ minute , $ second, 1000000 * ( $ second - ( int ) $ second ) );
511
511
512
512
$ this ->assertEquals ($ expected , Inline::parse ($ yaml , Yaml::PARSE_DATETIME ));
513
513
}
514
514
515
515
public function getTimestampTests ()
516
516
{
517
517
return array (
518
- 'canonical ' => array ('2001-12-15T02:59:43.1Z ' , 2001 , 12 , 15 , 2 , 59 , 43 ),
519
- 'ISO-8601 ' =
9D3D
> array ('2001-12-15t21:59:43.10-05:00 ' , 2001 , 12 , 16 , 2 , 59 , 43 ),
520
- 'spaced ' => array ('2001-12-15 21:59:43.10 -5 ' , 2001 , 12 , 16 , 2 , 59 , 43 ),
518
+ 'canonical ' => array ('2001-12-15T02:59:43.1Z ' , 2001 , 12 , 15 , 2 , 59 , 43.1 ),
519
+ 'ISO-8601 ' => array ('2001-12-15t21:59:43.10-05:00 ' , 2001 , 12 , 16 , 2 , 59 , 43.1 ),
520
+ 'spaced ' => array ('2001-12-15 21:59:43.10 -5 ' , 2001 , 12 , 16 , 2 , 59 , 43.1 ),
521
521
'date ' => array ('2001-12-15 ' , 2001 , 12 , 15 , 0 , 0 , 0 ),
522
522
);
523
523
}
@@ -530,7 +530,7 @@ public function testParseNestedTimestampListAsDateTimeObject($yaml, $year, $mont
530
530
$ expected = new \DateTime ($ yaml );
531
531
$ expected ->setTimeZone (new \DateTimeZone ('UTC ' ));
532
532
$ expected ->setDate ($ year , $ month , $ day );
533
- $ expected ->setTime ($ hour , $ minute , $ second );
533
+ @ $ expected ->setTime ($ hour , $ minute , $ second, 1000000 * ( $ second - ( int ) $ second ) );
534
534
535
535
$ expectedNested = array ('nested ' => array ($ expected ));
536
536
$ yamlNested = "{nested: [ $ yaml]} " ;
0 commit comments