mess822_date

Section: C Library Functions (3)
Index Return to Main Contents
 

NAME

mess822_date - print a timestamp in RFC 822 format  

SYNTAX

#include <mess822.h>

int mess822_date(&sa,&t);

stralloc sa;
mess822_time t;  

DESCRIPTION

mess822_date takes the timestamp in t and puts it into sa in RFC 822 format. It returns 1 on success, 0 if it runs out of memory.

See http://pobox.com/~djb/proto/immhf/date.html for a description of the RFC 822 timestamp format. Typical example:


   16 Aug 1998 15:09:01 -0000

The timestamp in t has the following structure. If t.known is 0 then there is no timestamp; mess822_date prints an empty string. If t.known is 1 then t.ct contains a date and time in UTC in struct caltime format, with no information about the timestamp creator's time zone. If t.known is 2 then t.ct contains a date and time in the timestamp creator's time zone.

mess822_date can tolerate out-of-range numbers for month, day, hour, minute, second, and zone, though in this case it no longer guarantees that its output will make sense.

mess822_date can handle years from 1900 through at least 2000000000.  

SEE ALSO

caltime(3), mess822(3), mess822_when(3)


 

Index

NAME
SYNTAX
DESCRIPTION
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 14:39:30 GMT, December 08, 2024