Skip to content

Commit 118c089

Browse files
committed
gmtime bugfix
1 parent 3281576 commit 118c089

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ CXXFLAGS += -Wall -Wextra -Wno-sign-compare -Wno-missing-field-initializers \
1818
LDFLAGS += -fuse-ld=lld
1919

2020
ifeq ($(DEBUG),1)
21-
CXXFLAGS += -O2 -g -DDEBUG=1 \
21+
CXXFLAGS += -O1 -g -DDEBUG=1 \
2222
-fasynchronous-unwind-tables \
2323
-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG \
2424
-fstack-protector-all

src/HTTPServer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ void HTTPServer::sendResponse(Client* cl, HTTPResponse* resp, bool disconnect) {
649649
time_t rawtime;
650650
struct tm* ptm = nullptr;
651651
time(&rawtime);
652-
ptm = gmtime_r(&rawtime, ptm);
652+
ptm = std::gmtime(&rawtime);
653653
if (ptm != nullptr) {
654654
// Ex: Fri, 31 Dec 1999 23:59:59 GMT
655655
strftime(tbuf, 36, "%a, %d %b %Y %H:%M:%S GMT", ptm);

0 commit comments

Comments
 (0)