@@ -566,17 +566,17 @@ public function testParseTimestampAsDateTimeObject($yaml, $year, $month, $day, $
566
566
$ expected = new \DateTime ($ yaml );
567
567
$ expected ->setTimeZone (new \DateTimeZone ('UTC ' ));
568
568
$ expected ->setDate ($ year , $ month , $ day );
569
- $ expected ->setTime ($ hour , $ minute , $ second );
569
+ @ $ expected ->setTime ($ hour , $ minute , $ second, 1000000 * ( $ second - ( int ) $ second ) );
570
570
571
571
$ this ->assertEquals ($ expected , Inline::parse ($ yaml , Yaml::PARSE_DATETIME ));
572
572
}
573
573
574
574
public function getTimestampTests ()
575
575
{
576
576
return array (
577
- 'canonical ' => array ('2001-12-15T02:59:43.1Z ' , 2001 , 12 , 15 , 2 , 59 , 43 ),
578
- 'ISO-8601 ' => array ('2001-12-15t21:59:43.10-05:00 ' , 2001 , 12 , 16 , 2 , 59 , 43 ),
579
- 'spaced ' => array ('2001-12-15 21:59:43.10 -5 ' , 2001 , 12 , 16 , 2 , 59 , 43 ),
577
+ 'canonical ' => array ('2001-12-15T02:59:43.1Z ' , 2001 , 12 , 15 , 2 , 59 , 43.1 ),
578
+ 'ISO-8601 ' => array ('2001-12-15t21:59:43.10-05:00 ' , 2001 , 12 , 16 , 2 , 59 , 43.1 ),
579
+ 'spaced ' => array ('2001-12-15 21:59:43.10 -5 ' , 2001 , 12 , 16 , 2 , 59 , 43.1 ),
580
580
'date ' => array ('2001-12-15 ' , 2001 , 12 , 15 , 0 , 0 , 0 ),
581
581
);
582
582
}
@@ -589,7 +589,7 @@ public function testParseNestedTimestampListAsDateTimeObject($yaml, $year, $mont
589
589
$ expected = new \DateTime ($ yaml );
590
590
$ expected ->setTimeZone (new \DateTimeZone ('UTC ' ));
591
591
$ expected ->setDate ($ year , $ month , $ day );
592
- $ expected ->setTime ($ hour , $ minute , $ second );
592
+ @ $ expected ->setTime ($ hour , $ minute , $ second, 1000000 * ( $ second - ( int ) $ second ) );
593
593
594
594
$ expectedNested = array ('nested ' => array ($ expected ));
595
595
$ yamlNested = "{nested: [ $ yaml]} " ;
0 commit comments