Timestamp creation in Handler can fail #2

Closed
opened 2024-01-15 13:54:22 -05:00 by dustinwilson · 1 comment
Owner

Because of how the timestamps are created using microtime allowing for microsecond precision timestamps that occur exactly on the second will be integers. The DateTimeImmutable::format method expects a string representation of a floating point number and will fail.

The solution is to use sprintf and format the output of microtime to always have 4 decimal points.

Because of how the timestamps are created using `microtime` allowing for microsecond precision timestamps that occur exactly on the second will be integers. The `DateTimeImmutable::format` method expects a string representation of a floating point number and will fail. The solution is to use `sprintf` and format the output of `microtime` to always have 4 decimal points.
Author
Owner

Fixed in 0a710986cd.

Fixed in 0a710986cd.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: MensBeam/Logger#2
No description provided.