diff options
author | Rob Landley <rob@landley.net> | 2015-08-08 16:06:24 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-08-08 16:06:24 -0500 |
commit | 5fb2766a9b51ee326a14ec9909066b20a2bfa9ac (patch) | |
tree | cde439ad83b28f92ba9976c189b9eb20ea5a0bbb /tests/blkid/msdos.bz2 | |
parent | 400dacdeb69bc13868a625fc2ce8b49b6acd5ae3 (diff) | |
download | toybox-5fb2766a9b51ee326a14ec9909066b20a2bfa9ac.tar.gz |
Teach date @unixtime[.fraction], switch -s to be -D (matching busybox and
not stomping on gnu's "an extra argument tells it to set the time so let's
add -s to do the same thing" extension).
Nanoseconds aren't uniformly supported by these apis, so had to stick it in
GLOBALS() and pull it out later. Awkward, open to suggestions for a better way.
(Also, the setting API is microseconds, not nanoseconds. Collect nano, convert
to micro so we can switch APIs later without changing date's external UI again.)
Oh, and shrink really_long_name_mktime() with a for() loop (and rename it)
although I may go back and redo that for portability to hypothetical libraries
if I can convert this mess to struct timespec with proper nanoseconds support.
But that needs an extended strptime() which needs an extended struct tm,
and between us and that is convincing posix computers got fast enough to
care about fractions of a second.
(Yes, I'm aware gnu added %N to date without adding it to strptime, implying
they reimplemented strptime longhand inside date. I'm not doing that.)
Diffstat (limited to 'tests/blkid/msdos.bz2')
0 files changed, 0 insertions, 0 deletions