imta_get_date - Provides the current date and time in an RFC 822/1123 compliant format.
#include <sys/types.h> #include <time.h> #include <imta.h>
void imta_get_date( char *date, time_t t);
void imta_parse_date( const char *date, struct tm *tm);
The routine imta_get_date() supplies date and time in an RFC 822/1123 compliant format. The returned string will be in a format compatible with RFC 822 and RFC 1123. For example:
Wed, 16 Sep 1992 17:52:03 PDT
This string is then for instance suitable for use in a «Date:» header line.
date is the buffer in which the returned string is placed. It is allocated by the caller and must be at least IM_DATE_LEN bytes long.
To obtain the string representation of the current date and time, t must be set to 0. If not null, the time t is used to create the date string instead of the current time.
imta_parse_date() parse a date in the format described above and builds a struct tm structure from it. This call is in particularly useful to parse the date argument output by immd_read_failure_log().
center, box; c | c l | l .
Attribute Type Attribute Value
_
imta_init(3) , imhdr_add_line(3)