tz-erl: Better document problem when a zone begins or ends using DST.

Worked around 2015 Uraguay problem by allowing database to be generated
for 2016 instead (with "make DATE=2016-01-01").
This commit is contained in:
David Hull 2015-11-21 22:48:36 +00:00
parent 031652afd4
commit 73665bea0b
2 changed files with 6 additions and 2 deletions

View file

@ -1,9 +1,10 @@
TZDIR=tzdata
TZ_FILES=$(addprefix $(TZDIR)/, africa antarctica asia australasia backward etcetera europe northamerica southamerica)
tzout: DATE := $(shell date +%F)
tzout: $(TZ_FILES)
TZ_VERSION=`perl -n -e 'm/^VERSION\s*=\s*(\S+)/ and print $$1;' $(TZDIR)/Makefile`; \
./tz-erl --version $$TZ_VERSION -o $@ $^
./tz-erl --version $$TZ_VERSION --date $(DATE) -o $@ $^
$(TZ_FILES): $(TZDIR)

View file

@ -292,7 +292,10 @@ sub zone_line {
$rule1 = $rule2 = RULE_NULL;
} elsif (scalar(@rules) == 1) {
# One active rule. This is a year that DST started or stopped
# being observed
# being observed. erlang_localtime doesn't handle this. If DST
# stopped being observed in this year, don't output a DST rule.
# If DST started being observed, do. (Except that we don't handle
# this yet.)
print STDERR Data::Dump::dump(\@rules), "\n";
die "one rule for $name";
$name1 = zonename($format, $rules[0]->[RULE_LETTERS], undef);