1
0
mirror of https://frontier.innolan.net/rainlance/amiga-tz.git synced 2025-11-22 00:12:32 +00:00

* zdump.c (main): Fix bug with 'zdump -Vc 1981,1982 Asia/Singapore'

missing the end-of-1981 transition.  Problem reported by Tim Parenti in:
http://mm.icann.org/pipermail/tz/2014-September/021565.html
This commit is contained in:
Paul Eggert
2014-09-06 16:34:00 -07:00
parent 76409ad9c6
commit 53d5038b3f
2 changed files with 7 additions and 5 deletions

3
NEWS
View File

@ -17,6 +17,9 @@ Unreleased, experimental changes
Changes affecting code
zdump -c no longer mishandles transitions near year boundaries.
(Thanks to Tim Parenti for reporting the problem.)
An access to uninitalized data has been fixed.
(Thanks to Jörg Richter for reporting the problem.)

View File

@ -654,12 +654,11 @@ main(int argc, char *argv[])
tmp = my_localtime_rz(tz, &t, &tm);
if (tmp)
ab = saveabbr(&abbrev, &abbrevsize, &tm);
for ( ; ; ) {
newt = (t < absolute_max_time - SECSPERDAY / 2
while (t < cuthitime) {
newt = ((t < absolute_max_time - SECSPERDAY / 2
&& t + SECSPERDAY / 2 < cuthitime)
? t + SECSPERDAY / 2
: absolute_max_time);
if (cuthitime <= newt)
break;
: cuthitime);
newtmp = localtime_rz(tz, &newt, &newtm);
if ((tmp == NULL || newtmp == NULL) ? (tmp != newtmp) :
(delta(&newtm, &tm) != (newt - t) ||