From 5d55c98cd24ef161b80c69e20cd9b0512d2f2179 Mon Sep 17 00:00:00 2001 From: Guo-wei Shieh Date: Tue, 26 May 2015 11:53:29 -0700 Subject: [PATCH] WebRTC 4521: Remove usage of deprecated timezone global variable BUG=4521 R=pthatcher@webrtc.org Review URL: https://webrtc-codereview.appspot.com/56469004 Cr-Commit-Position: refs/heads/master@{#9285} --- webrtc/base/httpcommon.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webrtc/base/httpcommon.cc b/webrtc/base/httpcommon.cc index cff954cca5..138ca42ffc 100644 --- a/webrtc/base/httpcommon.cc +++ b/webrtc/base/httpcommon.cc @@ -387,6 +387,10 @@ bool HttpDateToSeconds(const std::string& date, time_t* seconds) { tm *tm_for_timezone = localtime(&gmt); *seconds = gmt + tm_for_timezone->tm_gmtoff; #else +#if _MSC_VER >= 1900 + long timezone = 0; + _get_timezone(&timezone); +#endif *seconds = gmt - timezone; #endif return true;