-
Notifications
You must be signed in to change notification settings - Fork 3.6k
add tests to support issue 4476 #4519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can add:
/** @var float|int */
before this statement to eliminate the Phpstan error.
The test failure here is, as we already know, a consequence of floating point rounding. However, it can be coded to avoid a problem. You want the result to agree to minutes (and the same general discussion would apply if you wanted to agree to seconds). You can achieve that by doing the following before formatting the DateTime object:
Date::roundMicroseconds($dt);
This is:
Checklist:
Why this change is needed?
This test shall proof that a time is interpreted wrongly, at least with XLSX. Cf. #4479 (comment)
Screenshot_20250620_120113