diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2021-10-15 18:53:55 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-10-15 18:54:49 -0700 |
| commit | 074cbe590bb5f9d4be7334162e0803264bf5717d (patch) | |
| tree | 0c95c04744c2321bcc0108f67c9eaa6c784681de /src/diff.c | |
| parent | 08b103ff4da9be30ea90e5a04b4ccea694f18ed3 (diff) | |
| download | diffutils-074cbe590bb5f9d4be7334162e0803264bf5717d.tar.gz | |
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.
Diffstat (limited to 'src/diff.c')
| -rw-r--r-- | src/diff.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -729,6 +729,9 @@ main (int argc, char **argv) #else time_format = "%Y-%m-%d %H:%M:%S %z"; #endif +#if !HAVE_TM_GMTOFF + localtz = tzalloc (getenv ("TZ")); +#endif } else { |
