diff options
author | Stef Walter <stef@memberwebs.com> | 2005-05-28 19:53:18 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2005-05-28 19:53:18 +0000 |
commit | 5f38d6f9a3768cc528521bde23256056a34985f6 (patch) | |
tree | 30511f72b87ddd3d2174d21df214f8925636c324 /common/smtppass.c | |
parent | b8a55c50fc4d12ab46d00c994228b6e09e4beca7 (diff) |
More fixes to the date code.
Diffstat (limited to 'common/smtppass.c')
-rw-r--r-- | common/smtppass.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/common/smtppass.c b/common/smtppass.c index 8a09cc8..550484d 100644 --- a/common/smtppass.c +++ b/common/smtppass.c @@ -1336,8 +1336,16 @@ static void make_date(spctx_t* ctx, char* date) trim_end(date); date_len = strlen(date); - snprintf(date + date_len, MAX_DATE_LENGTH - date_len, " %+03d%02d (%s)", - (int)(timezone / 3600), (int)(timezone % 3600), tzname[t2.tm_isdst ? 1 : 0]); + { +#ifdef HAVE_TM_GMTOFF + time_t timezone = t2.tm_gmtoff; + const char *tzname[2] = { t2.tm_zone, t2.tm_zone }; +#else + tzset(); +#endif + snprintf(date + date_len, MAX_DATE_LENGTH - date_len, " %+03d%02d (%s)", + (int)(timezone / 3600), (int)(timezone % 3600), tzname[t2.tm_isdst ? 1 : 0]); + } /* Break it off just in case */ date[MAX_DATE_LENGTH - 1] = 0; |