From bc33a8a0c77285b2bdb5c5d0a4243f7b442a0293 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 17 Aug 2012 11:09:12 -0700 Subject: [PATCH] test-parse-datetime: avoid glibc leap-second glitch * tests/test-parse-datetime.c (main): Set TZ to US Eastern time with the 2012 rules. Problem reported by Bruce Dubbs in . --- ChangeLog | 7 +++++++ tests/test-parse-datetime.c | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3b9c7f561..22e77dba0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-08-17 Paul Eggert + + test-parse-datetime: avoid glibc leap-second glitch + * tests/test-parse-datetime.c (main): Set TZ to US Eastern time + with the 2012 rules. Problem reported by Bruce Dubbs in + . + 2012-08-14 Bruno Haible gnulib-tool: Fix indentation of generated gnulib-comp.m4 file. diff --git a/tests/test-parse-datetime.c b/tests/test-parse-datetime.c index 1c9fd2dbd..98ce64bc1 100644 --- a/tests/test-parse-datetime.c +++ b/tests/test-parse-datetime.c @@ -123,6 +123,12 @@ main (int argc _GL_UNUSED, char **argv) set_program_name (argv[0]); + /* Set the time zone to US Eastern time with the 2012 rules. This + should disable any leap second support. Otherwise, there will be + a problem with glibc on sites that default to leap seconds; see + . */ + setenv ("TZ", "EST5EDT,M3.2.0,M11.1.0", 1); + gmtoff = gmt_offset (ref_time); -- 2.11.0