summaryrefslogtreecommitdiff
path: root/timezone/zic.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2013-05-23 23:37:00 +0200
committerThomas Schwinge <thomas@codesourcery.com>2013-05-23 23:37:00 +0200
commitf9e888643115b4b2f28853ebd1733f4410fb8839 (patch)
tree58c69f6cef623679080e8933b6c79880bfbd7cb8 /timezone/zic.c
parentd78eef6ebc008f784f501ce208bef12c6eafda27 (diff)
parentb934acf0e93c5a220551ed6e686bb9d45a24a8cc (diff)
Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_Whittaker
Diffstat (limited to 'timezone/zic.c')
-rw-r--r--timezone/zic.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/timezone/zic.c b/timezone/zic.c
index a5202a1ac3..91f0d20cc1 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)