From 1af7ff6a81b64c700c00eff8ec5340c03abd0fe1 Mon Sep 17 00:00:00 2001 From: Roker Date: Wed, 29 Jul 2020 00:50:40 +0200 Subject: [PATCH] JSON-159: After ENGINE-780 we have timegm_with_gmtoff() which does the right thing on all platforms. --- server/inout.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/server/inout.cc b/server/inout.cc index 99f9e17..901a189 100644 --- a/server/inout.cc +++ b/server/inout.cc @@ -169,10 +169,7 @@ js::Value to_json(timestamp * const& t) return js::Value{}; } - // neither timegm() nor mktime() respect t->tm_gmtoff for their conversions. What a mess! - // But t->tm_gmtoff is non-standard, though, and doesn't exist on MS Windows. In ENGINE-735 - // we switched to `timestamp` to cater for Windows and now convert to UTC in Windows' `timegm`. - const int64_t u = timegm(t); + const int64_t u = timegm_with_gmtoff(t); return js::Value{u}; }