[Patch by Arthur David Olson.] Problem reported by Paul Eggert in <http://mm.icann.org/pipermail/tz/2013-January/018532.html>. * zic.c (stringzone): Check for day of month too, when finding latest rule. --- zic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zic.c b/zic.c index a5202a1..806e613 100644 --- a/zic.c +++ b/zic.c @@ -1851,7 +1851,9 @@ stringzone(char *result, const struct zone *const zpfirst, const int zonecount) rp = &zp->z_rules[i]; if (stdrp == NULL || rp->r_hiyear > stdrp->r_hiyear || (rp->r_hiyear == stdrp->r_hiyear && - rp->r_month > stdrp->r_month)) + (rp->r_month > stdrp->r_month || + (rp->r_month == stdrp->r_month && + rp->r_dayofmonth > stdrp->r_dayofmonth)))) stdrp = rp; } if (stdrp != NULL && stdrp->r_stdoff != 0) -- 1.7.10.4