This change doesn't handle TIMEZONE, tm_isdst and leap seconds.
localtime and gmtime share the same common code. They call update_from_seconds.
Thus added only validation tests for localtime.
Paths
| Differential D140521
[libc] Introduces localtime to LLVM libc, based on C99/C2X/Single Unix Sp. Needs ReviewPublic Authored by rtenneti on Dec 21 2022, 5:35 PM. This revision needs review, but there are no reviewers specified.
Details
Summary This change doesn't handle TIMEZONE, tm_isdst and leap seconds. localtime and gmtime share the same common code. They call update_from_seconds.
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptDec 21 2022, 5:35 PM Comment Actions I don't think landing this without it having any way of displaying a different time than gmtime is a good idea. Happily, I started working on the TZ patch again, so this might be good to land early in the year.
Revision Contents
Diff 484918 libc/config/linux/aarch64/entrypoints.txt
libc/config/linux/x86_64/entrypoints.txt
libc/docs/date_and_time.rst
libc/spec/stdc.td
libc/src/time/CMakeLists.txt
libc/src/time/localtime.h
libc/src/time/localtime.cpp
libc/src/time/localtime_r.h
libc/src/time/localtime_r.cpp
libc/src/time/time_utils.h
libc/test/src/time/CMakeLists.txt
libc/test/src/time/localtime_r_test.cpp
libc/test/src/time/localtime_test.cpp
|