diffutils/tests/timezone
Paul Eggert 074cbe590b diff: fix timezone bug on Solaris
Problem reported by Vladimir Marek (bug#51228).
* NEWS: Mention this.
* src/context.c (print_context_label): Pass localtz to nstrftime,
instead of always passing 0.
* src/diff.c (main) [!HAVE_TM_GMTOFF]:
Initialize localtz if time_format uses %z.
* src/diff.h (localtz): New decl.
* tests/Makefile.am (TESTS): Add timezone.
* tests/timezone: New test.
2021-10-15 18:54:49 -07:00

15 lines
259 B
Bash
Executable File

#!/bin/sh
# In diff 3.4 through 3.8, this would output the wrong timezone on Solaris.
. "${srcdir=.}/init.sh"; path_prepend_ ../src
fail=0
echo a >a || fail=1
case $(LC_ALL=C TZ=EST5 diff -u /dev/null a) in
*' -0500'*) ;;
*) fail=1 ;;
esac
Exit $fail