From c4fcee5f94d9b1455d2efdb802991349f7e22882 Mon Sep 17 00:00:00 2001 From: Nishi Date: Wed, 18 Sep 2024 09:51:17 +0000 Subject: [PATCH] some fix for old windows git-svn-id: file:///raid/svn-personal/tewi/trunk@45 8739d7e6-ffea-ec47-b151-bdff447c6205 --- Server/server.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.43.0