gnucash maint: Fix test-gnc-timezone failure caused by latest zoneinfo release.

John Ralls jralls at code.gnucash.org
Sat Dec 26 16:47:05 EST 2020


Updated	 via  https://github.com/Gnucash/gnucash/commit/ae66da96 (commit)
	from  https://github.com/Gnucash/gnucash/commit/89af5710 (commit)



commit ae66da96324e6b8545456c980caf81c93d368402
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Dec 26 13:45:28 2020 -0800

    Fix test-gnc-timezone failure caused by latest zoneinfo release.
    
    See the comment for details.

diff --git a/libgnucash/engine/test/gtest-gnc-timezone.cpp b/libgnucash/engine/test/gtest-gnc-timezone.cpp
index a676ff1a9..25d9d9d45 100644
--- a/libgnucash/engine/test/gtest-gnc-timezone.cpp
+++ b/libgnucash/engine/test/gtest-gnc-timezone.cpp
@@ -134,6 +134,13 @@ TEST(gnc_timezone_constructors, test_IANA_Belize_tz)
             EXPECT_EQ(tz->dst_zone_abbrev(), "CDT");
             EXPECT_EQ(tz->dst_offset().total_seconds(), 3600);
         }
+        /* An IANA update on 22 Dec 2020 added missing DST transitions
+         * for Belize between 1943 and 1967. Ignore those years until
+         * the oldest supported OS version release is later than that
+         * because distros updating of zoneinfo is spotty.
+         */
+        else if (year >= 1943 && year <= 1967)
+            continue;
         else
         {
             EXPECT_EQ(tz->std_zone_abbrev(), "CST");



Summary of changes:
 libgnucash/engine/test/gtest-gnc-timezone.cpp | 7 +++++++
 1 file changed, 7 insertions(+)



More information about the gnucash-changes mailing list