From: Nishi Date: Wed, 18 Sep 2024 09:51:17 +0000 (+0000) Subject: some fix for old windows X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=c4fcee5f94d9b1455d2efdb802991349f7e22882;p=tewi.git some fix for old windows git-svn-id: file:///raid/svn-personal/tewi/trunk@45 8739d7e6-ffea-ec47-b151-bdff447c6205 --- diff --git a/Server/server.c b/Server/server.c index 367d3ac..5f83de5 100644 --- a/Server/server.c +++ b/Server/server.c @@ -435,7 +435,10 @@ void tw_server_pass(int sock, bool ssl, int port, SOCKADDR addr) { struct tm tm; strptime(req.headers[i + 1], "%a, %d %b %Y %H:%M:%S GMT", &tm); #ifdef __MINGW32__ - cmtime = _mkgmtime(&tm); + time_t t = 0; + struct tm* btm = localtime(&t); + cmtime = mktime(&tm); + cmtime -= (btm->tm_hour * 60 + btm->tm_min) * 60; #else cmtime = timegm(&tm); #endif