test-parse-datetime: avoid glibc leap-second glitch
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 Aug 2012 18:09:12 +0000 (11:09 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 Aug 2012 18:09:40 +0000 (11:09 -0700)
* tests/test-parse-datetime.c (main): Set TZ to US Eastern time
with the 2012 rules.  Problem reported by Bruce Dubbs in
<http://bugs.gnu.org/12206>.

ChangeLog
tests/test-parse-datetime.c

index 3b9c7f5..22e77db 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-08-17  Paul Eggert  <eggert@cs.ucla.edu>
+
+       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
+       <http://bugs.gnu.org/12206>.
+
 2012-08-14  Bruno Haible  <bruno@clisp.org>
 
        gnulib-tool: Fix indentation of generated gnulib-comp.m4 file.
index 1c9fd2d..98ce64b 100644 (file)
@@ -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
+     <http://bugs.gnu.org/12206>.  */
+  setenv ("TZ", "EST5EDT,M3.2.0,M11.1.0", 1);
+
   gmtoff = gmt_offset (ref_time);