diff options
author | Ron Yorston <rmy@pobox.com> | 2021-09-16 10:26:14 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-09-17 00:11:30 +0200 |
commit | 9fe1548bbfde548d54acaab113656a56ea0ccc72 (patch) | |
tree | babe79b4f502417ca91a8fab3099f29ff718de19 /libbb/Config.src | |
parent | 83e20cb81ca6d22a1ca268a0a64523b5af67325a (diff) | |
download | busybox-w32-9fe1548bbfde548d54acaab113656a56ea0ccc72.tar.gz busybox-w32-9fe1548bbfde548d54acaab113656a56ea0ccc72.tar.bz2 busybox-w32-9fe1548bbfde548d54acaab113656a56ea0ccc72.zip |
date,touch: allow timezone offsets in dates
Allow ISO 8601 style dates to include a timezone offset. Like
the '@' format these dates aren't relative to the user's current
timezone and shouldn't be subject to DST adjustment.
- The implementation uses the strptime() '%z' format specifier.
This an extension which may not be available so the use of
timezones is a configuration option.
- The 'touch' applet has been updated to respect whether DST
adjustment is required, matching 'date'.
function old new delta
parse_datestr 624 730 +106
static.fmt_str 106 136 +30
touch_main 388 392 +4
date_main 818 819 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 141/0) Total: 141 bytes
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/Config.src')
-rw-r--r-- | libbb/Config.src | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libbb/Config.src b/libbb/Config.src index f97de8ef7..58c5fad50 100644 --- a/libbb/Config.src +++ b/libbb/Config.src | |||
@@ -395,3 +395,14 @@ config FEATURE_HWIB | |||
395 | default y | 395 | default y |
396 | help | 396 | help |
397 | Support for printing infiniband addresses in network applets. | 397 | Support for printing infiniband addresses in network applets. |
398 | |||
399 | config FEATURE_TIMEZONE | ||
400 | bool "Allow timezone in dates" | ||
401 | default y | ||
402 | depends on DESKTOP | ||
403 | help | ||
404 | Permit the use of timezones when parsing user-provided data | ||
405 | strings, e.g. '1996-04-09 12:45:00 -0500'. | ||
406 | |||
407 | This requires support for the '%z' extension to strptime() which | ||
408 | may not be available in all implementations. | ||