The number of days should be rounded down, for both positive and
negative times since epoch. The original code truncated, which is
correct for positive values, but wrong for negative values.
Depends on D138826
Paths
| Differential D154865
[libc++][format] Fixes times before epoch. ClosedPublic Authored by Mordante on Jul 10 2023, 10:24 AM.
Details
Summary The number of days should be rounded down, for both positive and Depends on D138826
Diff Detail
Event Timeline
This revision is now accepted and ready to land.Jul 18 2023, 10:22 AM Closed by commit rGb9f3d241f46c: [libc++][format] Fixes times before epoch. (authored by Mordante). · Explain WhyJul 18 2023, 12:17 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 541672 libcxx/include/__chrono/convert_to_tm.h
libcxx/test/std/time/time.syn/formatter.file_time.pass.cpp
libcxx/test/std/time/time.syn/formatter.local_time.pass.cpp
libcxx/test/std/time/time.syn/formatter.sys_time.pass.cpp
|
@h-vetinari you mean here? This should be 35. I probably should add a link to http://eel.is/c++draft/time.syn.