]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
silly me, I was meaning to do this change already as discussed on the libcurl
authorDaniel Stenberg <daniel@haxx.se>
Thu, 30 Oct 2003 09:13:04 +0000 (09:13 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 30 Oct 2003 09:13:04 +0000 (09:13 +0000)
list, we get the time in GMT and not localtime

lib/file.c

index 9f312320aac340725d8b4806176868830d1dde81..99310cceac69bec18d9dbbeae7b98050e92fc3b5 100644 (file)
@@ -201,11 +201,11 @@ CURLcode Curl_file(struct connectdata *conn)
 #ifdef HAVE_STRFTIME
     if(fstated) {
       struct tm *tm;
-#ifdef HAVE_LOCALTIME_R
+#ifdef HAVE_GMTIME_R
       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
-      tm = localtime((time_t *)&statbuf.st_mtime);
+      tm = gmtime((time_t *)&statbuf.st_mtime);
 #endif
       /* 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",