some fix for old windows
git-svn-id: file:///raid/svn-personal/tewi/trunk@45 8739d7e6-ffea-ec47-b151-bdff447c6205
This commit is contained in:
parent
1750ab068d
commit
c4fcee5f94
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user