From b97f2432ceadae1c24d2c6380e17e00620f78e88 Mon Sep 17 00:00:00 2001 From: Jesse Gumm Date: Fri, 9 Dec 2022 15:34:29 -0600 Subject: [PATCH] Make a few smaller changes to the db generation. Still not properly functional --- priv/db/Makefile | 2 +- priv/db/tz-erl | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/priv/db/Makefile b/priv/db/Makefile index 44071f0..2e85961 100644 --- a/priv/db/Makefile +++ b/priv/db/Makefile @@ -3,7 +3,7 @@ TZ_FILES=$(addprefix $(TZDIR)/, africa antarctica asia australasia backward etce tzout: DATE := $(shell date +%F) tzout: $(TZ_FILES) - TZ_VERSION=`perl -n -e 'm/^VERSION\s*=\s*(\S+)/ and print $$1;' $(TZDIR)/Makefile`; \ + TZ_VERSION=`cat $(TZDIR)/version`; \ ./tz-erl --version $$TZ_VERSION --date $(DATE) -o $@ $^ $(TZ_FILES): $(TZDIR) diff --git a/priv/db/tz-erl b/priv/db/tz-erl index ad21bd4..bcc743e 100755 --- a/priv/db/tz-erl +++ b/priv/db/tz-erl @@ -522,6 +522,9 @@ sub last_active_epoch { my $day = on_to_day_of_month($on, $year, $month); print "On=$on, Year=$year, Month=$month ====> Day=$day\n"; - return timelocal_nocheck(0, 0, 0, $day, $month, $year); + ## changing the below call to timelocal_nocheck stops the crash, but it feels wrong + ## especially since without it, it seems to produce a lot of "redundant" error messages + ## I don't have time to explore this now, but I'll come back to it + return timelocal(0, 0, 0, $day, $month, $year); }