From 78df0864a76d1543e8c97df75f125424a8e97250 Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Sat, 14 Jan 2023 11:49:32 +0100 Subject: Do not use ftime (deprecated) --- src/proxy/proxytrack.h | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'src/proxy') 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 -#ifndef HTS_DO_NOT_USE_FTIME #ifdef _WIN32 #include #else #include #endif #include -#else -#include -#endif #ifndef _WIN32 #include #endif -#include +#include /* 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) { -- cgit v1.2.3