summaryrefslogtreecommitdiff
path: root/src/proxy/proxytrack.h
diff options
context:
space:
mode:
authorXavier Roche <roche@httrack.com>2023-01-14 11:49:32 +0100
committerXavier Roche <roche@httrack.com>2023-01-14 15:12:07 +0100
commit78df0864a76d1543e8c97df75f125424a8e97250 (patch)
tree9502d67c3f20b1eac5c7860c9f151c048ce2b901 /src/proxy/proxytrack.h
parentf29275ccf45ff990d1de2290c48b98d85c28d98e (diff)
Do not use ftime (deprecated)
Diffstat (limited to 'src/proxy/proxytrack.h')
-rw-r--r--src/proxy/proxytrack.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/proxy/proxytrack.h b/src/proxy/proxytrack.h
index c8fc57d..e288e50 100644
--- a/src/proxy/proxytrack.h
+++ b/src/proxy/proxytrack.h
@@ -35,20 +35,16 @@ Please visit our Website: http://www.httrack.com
#include "store.h"
#include <sys/stat.h>
-#ifndef HTS_DO_NOT_USE_FTIME
#ifdef _WIN32
#include <sys/utime.h>
#else
#include <utime.h>
#endif
#include <sys/timeb.h>
-#else
-#include <utime.h>
-#endif
#ifndef _WIN32
#include <pthread.h>
#endif
-#include <stdarg.h>
+#include <stdarg.h>
/* generic */
@@ -378,17 +374,7 @@ HTS_UNUSED static struct tm PT_GetTime(time_t t) {
HTS_UNUSED static int set_filetime(const char *file, struct tm *tm_time) {
struct utimbuf tim;
-#ifndef HTS_DO_NOT_USE_FTIME
- struct timeb B;
-
- memset(&B, 0, sizeof(B));
- B.timezone = 0;
- ftime(&B);
- tim.actime = tim.modtime = mktime(tm_time) - B.timezone * 60;
-#else
- // bogus time (GMT/local)..
- tim.actime = tim.modtime = mktime(tm_time);
-#endif
+ tim.actime = tim.modtime = timegm(tm_time);
return utime(file, &tim);
}
HTS_UNUSED static int set_filetime_time_t(const char *file, time_t t) {