From 81764b6508de96302bdd0732fd898d346a1d6b1d Mon Sep 17 00:00:00 2001 From: Emmanuel Fleury Date: Thu, 10 Feb 2022 01:05:01 +0100 Subject: [PATCH] Fix unit test on date format '%Z' which is too versatile to be trustable --- glib/tests/date.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/glib/tests/date.c b/glib/tests/date.c index 1eceec91b..15aacf9ee 100644 --- a/glib/tests/date.c +++ b/glib/tests/date.c @@ -722,7 +722,6 @@ test_strftime (void) { "%X", "12:00:00 AM" }, { "%x", "" }, { "%Y", "0001" }, - { "%Z", "Pacific Standard Time" }, #else { "%B", "January" }, { "%b", "Jan" }, @@ -802,6 +801,11 @@ test_strftime (void) g_assert_cmpstr (buf, ==, strftime_checks[i].expect); } + /* Time zone is too versatile on OS_WIN32 to be checked precisely */ +#ifdef G_OS_WIN32 + g_assert_cmpint (g_date_strftime (buf, sizeof (buf), "%Z", d), !=, 0); +#endif + g_date_free (d); setlocale (LC_ALL, oldlocale);