SCCSID(@
(#)arpadate.c 3.11 1/12/83);
** ARPADATE -- Create date in ARPANET format
** ud -- unix style date string. if NULL, one is created.
** pointer to an ARPANET date field
** date is stored in a local buffer -- subsequent
** Timezone is computed from local time, rather than
** from whereever (and whenever) the message was sent.
** To do better is very hard.
** Some sites are now inserting the timezone into the
** local date. This routine should figure out what
** the format is and work appropriately.
extern struct tm
*localtime();
extern char *StdTimezone
, *DstTimezone
;
extern struct timeb
*ftime();
** This will be used if a null argument is passed and
** to resolve the timezone.
** Crack the UNIX date line in a singularly unoriginal way.
p
= &ud
[11]; /* 01:03:52 */
if (localtime(&t
)->tm_isdst
)
p
= timezone(t
.timezone
, localtime(&t
.time
)->tm_isdst
);