From babcb4bcf4c5c37e545f174db9ba99c62ebb877a Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Mon, 3 Aug 2020 16:59:29 -0700 Subject: 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). --- toys/posix/date.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'toys') 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. -- cgit v1.2.3