[libc-commits] [PATCH] D96684: Changes to mktime to handle invalid dates, overflow and underflow andcalculating the correct date and thenumber of seconds even if invalid datesare passed as arguments.
Raman Tenneti via Phabricator via libc-commits
libc-commits at lists.llvm.org
Sun Feb 14 20:57:48 PST 2021
rtenneti created this revision.
rtenneti added a reviewer: sivachandra.
Herald added subscribers: libc-commits, mgorny.
Herald added a project: libc-project.
rtenneti requested review of this revision.
Added tests for invalid dates like the following
Date 1970-01-01 00:00:-1 is treated as 1969-12-31 23:59:59 and seconds
are returned for the modified date.
Tested the code by doing ninja check-libc (and cmake).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D96684
Files:
libc/src/time/CMakeLists.txt
libc/src/time/mktime.cpp
libc/src/time/mktime.h
libc/src/time/time_utils.cpp
libc/src/time/time_utils.h
libc/test/src/time/mktime_test.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96684.323662.patch
Type: text/x-patch
Size: 31374 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20210215/f2812050/attachment-0001.bin>
More information about the libc-commits
mailing list