Commit Graph

16 Commits

Author SHA1 Message Date
Ron Yorston
9fe1548bbf 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>
2021-09-17 00:11:30 +02:00
Denys Vlasenko
61be8e46a8 testsuite: disable tests for no longer supported bbox-specific date formats
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-12-31 18:57:39 +01:00
Denys Vlasenko
47b03368f3 randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-10 10:45:48 +02:00
Denys Vlasenko
b47b3ce1bd randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-08-10 00:51:29 +02:00
Alexey Soloviev
a5d3d3436b date: preserve isdst value if date is in time_t (unix time) format
Signed-off-by: Alexey Soloviev <EXT-Alexey.Soloviev@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-31 05:21:51 +01:00
Dan Fandrich
775965de85 Improved portability of tests
Removed assumptions about umask and locale. Fixed hostname
tests to work even when the host has no DNS domain set.

Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-11 14:09:28 +02:00
Denys Vlasenko
9297dbc9d2 randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-05 21:37:12 +02:00
Denys Vlasenko
e82cf339e4 randomtest fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-12 15:59:32 +02:00
Denys Vlasenko
307b24c851 testsuite-discovered fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-25 02:00:16 +01:00
Denys Vlasenko
941990f0c5 correct date testsuite to use compatible format
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-18 04:54:21 +02:00
Denis Vlasenko
e4ed64067e date: better version of previous commit; + fix testsuite
to have it checked
2008-04-28 00:25:22 +00:00
Denis Vlasenko
4809a9f78e date: fix date-works test, add date-works-1 one (currently fails) 2008-04-27 20:58:43 +00:00
Denis Vlasenko
4d89a8bd1d date: make it accept ISO date format. Fix help text.
make testsuite actually test something useful.

function                                             old     new   delta
date_main                                           1094    1149     +55
2008-04-25 02:14:07 +00:00
Denis Vlasenko
ad6cab1834 partially fix date testsuite 2008-04-24 19:37:11 +00:00
Denis Vlasenko
fa5b05ab07 testsuite: fix 2008-04-23 06:42:49 +00:00
Eric Andersen
650fe63467 Kill off the old 'tests' stuff. Write a ton of new tests for the
'testsuite' dir.  Fix a bunch of broken tests.  Fix the testsuite
'runtest' script so it actually reports all failures and provides
meaningful feedback.
 -Erik
2004-04-06 11:10:30 +00:00