Use gmtime() not localtime() as RFC2616 says dates sent by a http server must be GMT/UTC

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5248 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
brain 2006-09-14 13:08:47 +00:00
parent 1d6fcf371c
commit 08b7e8e60e

View File

@ -172,7 +172,7 @@ class HttpSocket : public InspSocket
void SendHeaders(unsigned long size, int response, const std::string &extraheaders)
{
time_t local = this->Instance->Time();
struct tm *timeinfo = localtime(&local);
struct tm *timeinfo = gmtime(&local);
this->Write("HTTP/1.1 "+ConvToStr(response)+" "+Response(response)+"\r\nDate: ");
this->Write(asctime(timeinfo));
if (extraheaders.empty())