]> Savannah Git Hosting - gnulib.git/commitdiff
nstrftime, c-nstrftime tests: Avoid test failures on native Windows.
authorBruno Haible <bruno@clisp.org>
Mon, 27 May 2024 22:35:03 +0000 (00:35 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 27 May 2024 22:35:03 +0000 (00:35 +0200)
* doc/posix-functions/tzset.texi: Add a reference.
* tests/test-nstrftime.h (TZ): Use time zone names that are supported by
native Windows.
(LT): Disable a test of New Zealand DST.

ChangeLog
doc/posix-functions/tzset.texi
tests/test-nstrftime.h

index d06307f7a0811ba7578f44e9a878d57b71631657..9ba81c3b5f95aa689a1a5708146a099ca53af8c3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-05-27  Bruno Haible  <bruno@clisp.org>
+
+       nstrftime, c-nstrftime tests: Avoid test failures on native Windows.
+       * doc/posix-functions/tzset.texi: Add a reference.
+       * tests/test-nstrftime.h (TZ): Use time zone names that are supported by
+       native Windows.
+       (LT): Disable a test of New Zealand DST.
+
 2024-05-27  Bruno Haible  <bruno@clisp.org>
 
        nstrftime, c-nstrftime tests: Avoid some failures on native Windows.
index 983789eca74f8a50efd9f1d88345df644cd25622..30901d3488d3d12d4ee6de468c3dc730a811e1f2 100644 (file)
@@ -16,6 +16,7 @@ when the environment variable @code{TZ} has been set by Cygwin.
 Portability problems not fixed by Gnulib:
 @itemize
 @item
+@c https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/tzset
 Native Windows platforms (mingw, MSVC) support only a subset of
 POSIX-specified values for the @env{TZ} environment variable,
 consisting of a time zone abbreviation containing exactly three ASCII
index d8e2a3915dd13b6d0fa6df96a831416d3fe3d477..50c270440d3c5ed09ac82afecbe2fb4ee6adce7f 100644 (file)
@@ -103,18 +103,29 @@ static struct tzalloc_test TZ[] =
   {
 #define Pacific 0
     { 0, "PST8PDT,M3.2.0,M11.1.0"      },
+
 #define Arizona 1
     { 0, "MST7"                        },
+
 #define UTC 2
     { 0, 0                             },
+
 #define CentEur 3
     { 0, "CET-1CEST,M3.5.0,M10.5.0/3"  },
+
 #define Japan 4
     { 0, "JST-9"                       },
+
 #define NZ 5
+#if defined _WIN32 && !defined __CYGWIN__
+    { 0, "NST-13NDT"                   },
+#else
     { 0, "NZST-12NZDT,M9.5.0,M4.1.0/3" },
+#endif
+
 #define Unknown 6
     { 0, "<-00>0" },
+
     { 0 }
   };
 
@@ -157,7 +168,9 @@ static struct localtime_rz_test LT[] =
     { TZ+UTC    , 1000000002, "2001-09-09 01:46:42 +0000 (UTC)",  0 },
     { TZ+CentEur, 1000000002, "2001-09-09 03:46:42 +0200 (CEST)", 0 },
     { TZ+Japan  , 1000000002, "2001-09-09 10:46:42 +0900 (JST)",  0 },
+#if !(defined _WIN32 && !defined __CYGWIN__)
     { TZ+NZ     , 1000000002, "2001-09-09 13:46:42 +1200 (NZST)", 0 },
+#endif
 #if TZ_ANGLE_BRACKETS_SHOULD_WORK && !defined __FreeBSD__
     { TZ+Unknown,          0, "1970-01-01 00:00:00 -0000 (-00)",  0 },
     { TZ+Unknown,  500000001, "1985-11-05 00:53:21 -0000 (-00)",  0 },