mirror of
https://github.com/moparisthebest/curl
synced 2024-11-13 13:05:03 -05:00
silly me, I was meaning to do this change already as discussed on the libcurl
list, we get the time in GMT and not localtime
This commit is contained in:
parent
fb26b2bd98
commit
693df0fa34
@ -201,11 +201,11 @@ CURLcode Curl_file(struct connectdata *conn)
|
|||||||
#ifdef HAVE_STRFTIME
|
#ifdef HAVE_STRFTIME
|
||||||
if(fstated) {
|
if(fstated) {
|
||||||
struct tm *tm;
|
struct tm *tm;
|
||||||
#ifdef HAVE_LOCALTIME_R
|
#ifdef HAVE_GMTIME_R
|
||||||
struct tm buffer;
|
struct tm buffer;
|
||||||
tm = (struct tm *)localtime_r((time_t *)&statbuf.st_mtime, &buffer);
|
tm = (struct tm *)gmtime_r((time_t *)&statbuf.st_mtime, &buffer);
|
||||||
#else
|
#else
|
||||||
tm = localtime((time_t *)&statbuf.st_mtime);
|
tm = gmtime((time_t *)&statbuf.st_mtime);
|
||||||
#endif
|
#endif
|
||||||
/* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
|
/* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
|
||||||
strftime(buf, BUFSIZE-1, "Last-Modified: %a, %d %b %Y %H:%M:%S GMT\r\n",
|
strftime(buf, BUFSIZE-1, "Last-Modified: %a, %d %b %Y %H:%M:%S GMT\r\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user