Table of Contents

Name

imta_get_date - Provides the current date and time in an RFC 822/1123 compliant format.

Synopsis

#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);

Description

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().

Attributes

center, box; c | c l | l .
Attribute Type Attribute Value
_

Architecture
sparc, x86 _ Availability SUNWimsdk _ MT-Level MT-Safe _ Interface Stability Stable

SunOS 5.5.1 Last change: 05 Jan 1998 1

See Also

imta_init(3) , imhdr_add_line(3)

SunOS 5.5.1 Last change: 05 Jan 1998 2


Table of Contents