]> Savannah Git Hosting - gnulib.git/commitdiff
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 3b9c7f561cd6fc265d194ccfaacd01551b191aa5..22e77dba05a7a45d5b5fc3bf970b2bda7f6dd596 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 1c9fd2dbd213b6140840c6210fdf392bae0e9919..98ce64bc1b4b46824c01b7c2d9f68c50e734d734 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);