changeset 17044:0f6e45cf9274

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>.
author Paul Eggert <eggert@cs.ucla.edu>
date Fri, 17 Aug 2012 11:09:12 -0700
parents 842555580fe2
children 0e193bb29639
files ChangeLog tests/test-parse-datetime.c
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Aug 15 06:55:24 2012 -0700
+++ b/ChangeLog	Fri Aug 17 11:09:12 2012 -0700
@@ -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.
--- a/tests/test-parse-datetime.c	Wed Aug 15 06:55:24 2012 -0700
+++ b/tests/test-parse-datetime.c	Fri Aug 17 11:09:12 2012 -0700
@@ -123,6 +123,12 @@
 
   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);