-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
It's possible to get an exception when working with localised times #4350
Comments
Could you submit a PR to fix this? |
BTW what do |
Analyzing that is possibly a bit outside my ability, but I'll have a go:
That gets passed to Which builds out the string. |
I meant does pick earliest or latest or throws an exception in your example? |
Oh it doesn't throw an exception, it simply prints:
I tried to dive in again, it doesn't seem to call |
Environment:
Windows 10 x64
MSVC Version 17.12.4
It;'s possible to pass a
std::chrono::local_seconds
object toformat
that has an ambiguous time, so for example ~2am on April 6th 2025 in Sydney daylight savings ends.Sample Code (note, system running must be on AEDT)
This block here seems to be the cause:
fmt/include/fmt/chrono.h
Lines 575 to 580 in 94ab51c
to_sys
can throw exceptions in these cases, and needs to be passedstd::chrono::choose
The text was updated successfully, but these errors were encountered: