diff options
Diffstat (limited to 'runtime/datetime.c')
-rw-r--r-- | runtime/datetime.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/datetime.c b/runtime/datetime.c index 10ab3c64..c03abab9 100644 --- a/runtime/datetime.c +++ b/runtime/datetime.c @@ -77,7 +77,7 @@ timeval2syslogTime(struct timeval *tp, struct syslogTime *t) /* Solaris uses a different method of exporting the time zone. * It is UTC - localtime, which is the opposite sign of mins east of GMT. */ - lBias = -(daylight ? altzone : timezone); + lBias = -(tm->tm_isdst ? altzone : timezone); # elif defined(__hpux) lBias = tz.tz_dsttime ? - tz.tz_minuteswest : 0; # else @@ -900,6 +900,11 @@ time_t syslogTime2time_t(struct syslogTime *ts) case 12: MonthInDays = 334; //until 01 of December break; + default: /* this cannot happen (and would be a program error) + * but we need the code to keep the compiler silent. + */ + MonthInDays = 0; /* any value fits ;) */ + break; } |