[w3m-dev 03574] Re: preserve timestamp
* ftp.c (getFtpModtime): don't call localtime,gettime in same expr From: Takahashi Youichirou <nikuq@hk.airnet.ne.jp>
This commit is contained in:
		@@ -1,3 +1,8 @@
 | 
				
			|||||||
 | 
					2002-12-15  Takahashi Youichirou <nikuq@hk.airnet.ne.jp>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						* [w3m-dev 03574] Re: preserve timestamp
 | 
				
			||||||
 | 
						* ftp.c (getFtpModtime): don't call localtime,gettime in same expr
 | 
				
			||||||
 | 
					
 | 
				
			||||||
2002-12-15  Fumitoshi UKAI  <ukai@debian.or.jp>
 | 
					2002-12-15  Fumitoshi UKAI  <ukai@debian.or.jp>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	* [w3m-dev 03573] Re: Bug#172851: w3m: In form, takes hostname as baseref for relative URI action
 | 
						* [w3m-dev 03573] Re: Bug#172851: w3m: In form, takes hostname as baseref for relative URI action
 | 
				
			||||||
@@ -5873,4 +5878,4 @@ a	* [w3m-dev 03276] compile error on EWS4800
 | 
				
			|||||||
	* release-0-2-1
 | 
						* release-0-2-1
 | 
				
			||||||
	* import w3m-0.2.1
 | 
						* import w3m-0.2.1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$Id: ChangeLog,v 1.623 2002/12/14 16:09:51 ukai Exp $
 | 
					$Id: ChangeLog,v 1.624 2002/12/15 12:12:47 ukai Exp $
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										9
									
								
								ftp.c
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								ftp.c
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
				
			|||||||
/* $Id: ftp.c,v 1.17 2002/12/14 15:26:44 ukai Exp $ */
 | 
					/* $Id: ftp.c,v 1.18 2002/12/15 12:12:47 ukai Exp $ */
 | 
				
			||||||
#include <stdio.h>
 | 
					#include <stdio.h>
 | 
				
			||||||
#include <pwd.h>
 | 
					#include <pwd.h>
 | 
				
			||||||
#include <Str.h>
 | 
					#include <Str.h>
 | 
				
			||||||
@@ -357,7 +357,7 @@ getFtpModtime(FTP ftp, char *path)
 | 
				
			|||||||
    Str tmp;
 | 
					    Str tmp;
 | 
				
			||||||
    char *p;
 | 
					    char *p;
 | 
				
			||||||
    struct tm tm;
 | 
					    struct tm tm;
 | 
				
			||||||
    time_t t;
 | 
					    time_t t, lt, gt;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    memset(&tm, 0, sizeof(struct tm));
 | 
					    memset(&tm, 0, sizeof(struct tm));
 | 
				
			||||||
    tmp = Sprintf("MDTM %s\r\n", path);
 | 
					    tmp = Sprintf("MDTM %s\r\n", path);
 | 
				
			||||||
@@ -374,8 +374,9 @@ getFtpModtime(FTP ftp, char *path)
 | 
				
			|||||||
    tm.tm_year -= 1900;
 | 
					    tm.tm_year -= 1900;
 | 
				
			||||||
    tm.tm_mon--;
 | 
					    tm.tm_mon--;
 | 
				
			||||||
    t = mktime(&tm);
 | 
					    t = mktime(&tm);
 | 
				
			||||||
    t += mktime(localtime(&t)) - mktime(gmtime(&t));
 | 
					    lt = mktime(localtime(&t));
 | 
				
			||||||
    return t;
 | 
					    gt = mktime(gmtime(&t));
 | 
				
			||||||
 | 
					    return t + (lt - gt);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int
 | 
					int
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user