diff options
author | Elliott Hughes <enh@google.com> | 2020-08-03 16:59:29 -0700 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2020-08-04 03:13:14 -0500 |
commit | babcb4bcf4c5c37e545f174db9ba99c62ebb877a (patch) | |
tree | c57469ee0dbfb12f4f85ed65bd5cdbbb28796cce /toys | |
parent | dc7654192c4b0c599cf5f742673a0829d6eddcd9 (diff) | |
download | toybox-babcb4bcf4c5c37e545f174db9ba99c62ebb877a.tar.gz |
xparsedate: support UTC offsets.
Requested in https://github.com/landley/toybox/issues/130, quoting an
old version of the toybox help. This is also supported by coreutils.
Set $LANG to C in the date tests so that they pass with TEST_HOST=1
(they were already failing for me, presumably related to a newer glibc).
Diffstat (limited to 'toys')
-rw-r--r-- | toys/posix/date.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/toys/posix/date.c b/toys/posix/date.c index 7fe0388d..f34c347f 100644 --- a/toys/posix/date.c +++ b/toys/posix/date.c @@ -29,6 +29,9 @@ config DATE YYYY-MM-DD [hh:mm[:ss]] ISO 8601 hh:mm[:ss] 24-hour time today + All input formats can be followed by fractional seconds, and/or a UTC + offset such as -0800. + All input formats can be preceded by TZ="id" to set the input time zone separately from the output time zone. Otherwise $TZ sets both. |