diff options
| author | Eric S. Raymond <esr@thyrsus.com> | 1998-10-30 15:11:46 +0000 | 
|---|---|---|
| committer | Eric S. Raymond <esr@thyrsus.com> | 1998-10-30 15:11:46 +0000 | 
| commit | 3aa5ab52da6ece0a1a5d4d613639a8dbe5d7090d (patch) | |
| tree | fc586b4a81932419219c74f6f3d647229e908c18 /driver.c | |
| parent | 24c53bd6db1ef6763f0010552f1bee07abd4916a (diff) | |
| download | fetchmail-3aa5ab52da6ece0a1a5d4d613639a8dbe5d7090d.tar.gz fetchmail-3aa5ab52da6ece0a1a5d4d613639a8dbe5d7090d.tar.bz2 fetchmail-3aa5ab52da6ece0a1a5d4d613639a8dbe5d7090d.zip | |
Rationalized timestamps.
svn path=/trunk/; revision=2155
Diffstat (limited to 'driver.c')
| -rw-r--r-- | driver.c | 27 | 
1 files changed, 2 insertions, 25 deletions
| @@ -31,11 +31,6 @@  #include  <sys/time.h>  #include  <signal.h> -#ifndef HAVE_STRFTIME /* For ctime prototype */ -#include  <sys/types.h> -#include  <time.h> -#endif -  #ifdef HAVE_RES_SEARCH  #include <netdb.h>  #include "mx.h" @@ -866,8 +861,6 @@ static int readheaders(int sock, long fetchlen, long reallen, struct query *ctl,  	    n = stuffline(ctl, buf);  	    if (n != -1)  	    { -		time_t	now; -  		buf[0] = '\t';  		if (good_addresses == 0)  		{ @@ -890,24 +883,8 @@ static int readheaders(int sock, long fetchlen, long reallen, struct query *ctl,  		else  		    buf[1] = '\0'; -		time(&now); -#ifdef HAVE_STRFTIME -		/* -		 * Conform to RFC822.  This is typically going to emit -		 * a three-letter timezone for %Z, which is going to -		 * be marked "obsolete syntax" in 822bis.  Note that we -		 * generate a 4-digit year here. -		 */ -		strftime(buf + strlen(buf), sizeof(buf) - strlen(buf),  -			 "%a, %d %b %Y %H:%M:%S %Z\r\n", localtime(&now)); -#else -		/* -		 * This is really just a portability fallback, as the -		 * date format ctime(3) emits is not RFC822 -		 * conformant. -		 */ -		strcat(buf, ctime(&now)); -#endif /* HAVE_STRFTIME */ +		strcat(buf, rfc822timestamp()); +		strcat(buf, "\r\n");  		n = stuffline(ctl, buf);  	    }  	} | 
