File tree Expand file tree Collapse file tree
tests/Unit/Models/Attributes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ protected function convertWindowsIntegerTimeToDateTime(string|int|null $value =
190190 }
191191
192192 return (new DateTime )->setTimestamp (
193- (int ) ($ value / 10000000 ) - 11644473600
193+ (int ) (round ( $ value / 10000000 ) - 11644473600 )
194194 );
195195 }
196196
Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ public function test_windows_int_type_rounds_correctly()
154154 foreach (['133692539995000000 ' , '133692539999500000 ' ] as $ windowsIntegerTime ) {
155155 $ dateTime = $ timestamp ->toDateTime ($ windowsIntegerTime );
156156
157- $ expectedUnixTimestamp = (int ) ($ windowsIntegerTime / 10000000 ) - 11644473600 ;
157+ $ expectedUnixTimestamp = (int ) (round ( $ windowsIntegerTime / 10000000 ) - 11644473600 ) ;
158158
159159 $ this ->assertEquals ($ expectedUnixTimestamp , $ dateTime ->getTimestamp ());
160160 }
You can’t perform that action at this time.
0 commit comments