diff options
Diffstat (limited to 'elsie.nci.nih.gov/src/zic.c')
-rw-r--r-- | elsie.nci.nih.gov/src/zic.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/elsie.nci.nih.gov/src/zic.c b/elsie.nci.nih.gov/src/zic.c index 1964a89..91f0d20 100644 --- a/elsie.nci.nih.gov/src/zic.c +++ b/elsie.nci.nih.gov/src/zic.c @@ -426,8 +426,8 @@ usage(FILE *stream, int status) [ --version ] [ --help ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n\ \t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n\ \n\ -Report bugs to tz@iana.org.\n"), - progname, progname); +Report bugs to %s.\n"), + progname, progname, REPORT_BUGS_TO); exit(status); } @@ -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) |