Fix bogus logic for zic -P option.
authorTom Lane
Fri, 3 Oct 2014 18:48:11 +0000 (14:48 -0400)
committerTom Lane
Fri, 3 Oct 2014 18:48:32 +0000 (14:48 -0400)
commit909e48dddc50182e12c76734a6669a4fdbe080b3
tree9c5df6c0ec270d1f988cb991a1215cb16095535e
parent67ed9d53136dc98191c5945043a17a12e10b480b
Fix bogus logic for zic -P option.

The quick hack I added to zic to dump out currently-in-use timezone
abbreviations turns out to have a nasty bug: within each zone, it was
printing the last "struct ttinfo" to be *defined*, not necessarily the
last one in use.  This was mainly a problem in zones that had changed the
meaning of their zone abbreviation (to another GMT offset value) and later
changed it back.

As a result of this error, we'd missed out updating the tznames/ files
for some jurisdictions that have changed their zone abbreviations since
the tznames/ files were originally created.  I'll address the missing data
updates in a separate commit.
src/timezone/zic.c