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.
http://pobox.com/~djb/proto/immhf/date.html for a description of the RFC 822 timestamp format.
16 Aug 1998 15:09:01 -0000
The timestamp in
t has the following structure.
t.known is 0
then there is no timestamp;
mess822_date prints an empty string.
t.known is 1
t.ct contains a date and time in UTC in
struct caltime format,
with no information about the timestamp creators time zone.
t.known is 2
t.ct contains a date and time in the timestamp creators 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.