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

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

Issue 1077773002: Merge to XFA: Fix ref to timezone variable - removed in VS 2015 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Merge to latest. 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 72966e9c6376f4011f6a9723eeea987e416b5807..2b77766b7a9e82bcaed9c00db71d1c0780051a70 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8.cpp
@@ -761,6 +761,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