48 #define DAY_MIN (24 * HOUR_MIN)
82 lt = localtime(&when);
83 gmtoff = (lt->tm_hour - gmt.tm_hour) *
HOUR_MIN + lt->tm_min - gmt.tm_min;
84 if (lt->tm_year < gmt.tm_year)
86 else if (lt->tm_year > gmt.tm_year)
88 else if (lt->tm_yday < gmt.tm_yday)
90 else if (lt->tm_yday > gmt.tm_yday)
92 if (lt->tm_sec <= gmt.tm_sec -
MIN_SEC)
94 else if (lt->tm_sec >= gmt.tm_sec +
MIN_SEC)
102 #ifdef MISSING_STRFTIME_E
103 #define STRFTIME_FMT "%a, %d %b %Y %H:%M:%S "
105 #define STRFTIME_FMT "%a, %e %b %Y %H:%M:%S "
115 if (gmtoff < -DAY_MIN || gmtoff >
DAY_MIN)
116 msg_panic(
"UTC time offset %d is larger than one day", gmtoff);
const char * mail_date(time_t when)
NORETURN msg_panic(const char *fmt,...)
int main(int argc, char **argv)
VSTRING * vstring_sprintf_append(VSTRING *vp, const char *format,...)
VSTREAM * vstream_printf(const char *fmt,...)
#define VSTRING_RESET(vp)
VSTRING * vstring_alloc(ssize_t len)
#define vstring_avail(vp)
int vstream_fflush(VSTREAM *stream)
#define VSTRING_SPACE(vp, len)