Commit dec2937
committed
Replace fmt::localtime with portable thread-safe equivalent
fmt::localtime was removed in fmt 12. Replace it with an equivalent
that is thread-safe and portable:
- POSIX: localtime_r(&time, &tm)
- MSVC: localtime_s(&tm, &time) (reversed argument order)
Both are re-entrant and thread-safe, matching the guarantee that
fmt::localtime provided.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>1 parent 6ce2bc0 commit dec2937
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
32 | 42 | | |
33 | 43 | | |
34 | 44 | | |
| |||
0 commit comments