[Toybox] RFC: another stab at date.c.

Rob Landley rob at landley.net
Tue Mar 28 13:51:34 PDT 2017


There was a thread back in January where I tried to figure out why %s
wasn't working in date -D, which resulted in me being mad at mktime and
strptime for being stupidly designed, petering out around here:

http://lists.landley.net/pipermail/toybox-landley.net/2017-January/008829.html

Along the way, a problem I hit (repeatedly) was that chkmktime() is
really brittle, most recently that timezones can drive it nuts.

Here's the patch I have lying around to remove chkmktime and instead
just check the posix boundaries required by
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html but
I dunno if that fixes Elliott's original reasons for adding chkmktime in
the first place.

Opinions?

Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: date.patch
Type: text/x-diff
Size: 3464 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20170328/ad60bb86/attachment-0003.patch>


More information about the Toybox mailing list