From 54206aa6a2729c0bfe10321c6d74c441bef36223 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 13 Mar 2013 01:54:00 +0000 Subject: Update zic from tzcode 2013b. --- timezone/zic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'timezone') diff --git a/timezone/zic.c b/timezone/zic.c index a5202a1..91f0d20 100644 --- a/timezone/zic.c +++ b/timezone/zic.c @@ -1748,7 +1748,7 @@ stringoffset(char *result, long offset) minutes = offset % MINSPERHOUR; offset /= MINSPERHOUR; hours = offset; - if (hours >= HOURSPERDAY) { + if (hours > HOURSPERDAY) { result[0] = '\0'; return -1; } @@ -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) -- cgit v1.1