Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2677)

Unified Diff: fpdfsdk/src/jsapi/fxjs_v8.cpp

Issue 1075673002: Fix reference to timezone variable - removed in VS 2015 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Merging latest submitted changes. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/jsapi/fxjs_v8.cpp
diff --git a/fpdfsdk/src/jsapi/fxjs_v8.cpp b/fpdfsdk/src/jsapi/fxjs_v8.cpp
index edade5fb947220c6d228fa0db149fd1ed2ce7391..1fb2a0882fb0b514db06859f598c81704eb401ad 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp
@@ -758,6 +758,13 @@ double _getLocalTZA()
time_t t = 0;
time(&t);
localtime(&t);
+#if _MSC_VER >= 1900
+ // In gcc and in Visual Studio prior to VS 2015 'timezone' is a global
+ // variable declared in time.h. That variable was deprecated and in VS 2015
+ // is removed, with _get_timezone replacing it.
+ long timezone = 0;
+ _get_timezone(&timezone);
+#endif
return (double)(-(timezone * 1000));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698