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

Unified Diff: src/ports/SkTime_win.cpp

Issue 1562943002: SkTime: Stop using POSIX entensions to time.h for timezone (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-01-11 (Monday) 17:28:49 EST Created 4 years, 11 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 | « src/ports/SkTime_Unix.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkTime_win.cpp
diff --git a/src/ports/SkTime_win.cpp b/src/ports/SkTime_win.cpp
index 2589d43d44d1ef02abc8d9b62a90d9ac1957279f..f55ff90ea3038ae095b15e1be7d7e76e15c5e182 100644
--- a/src/ports/SkTime_win.cpp
+++ b/src/ports/SkTime_win.cpp
@@ -5,40 +5,4 @@
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
-#include "SkTypes.h"
-#if defined(SK_BUILD_FOR_WIN32)
-
-#include "SkTime.h"
-
-void SkTime::GetDateTime(DateTime* dt)
-{
- if (dt)
- {
- SYSTEMTIME st;
- TIME_ZONE_INFORMATION timeZoneInfo;
- int tz_bias;
- GetLocalTime(&st);
- // https://gist.github.com/wrl/8924636
- switch (GetTimeZoneInformation(&timeZoneInfo)) {
- case TIME_ZONE_ID_STANDARD:
- tz_bias = -timeZoneInfo.Bias - timeZoneInfo.StandardBias;
- break;
- case TIME_ZONE_ID_DAYLIGHT:
- tz_bias = -timeZoneInfo.Bias - timeZoneInfo.DaylightBias;
- break;
- default:
- tz_bias = -timeZoneInfo.Bias;
- break;
- }
- dt->fTimeZoneMinutes = SkToS16(tz_bias);
- dt->fYear = st.wYear;
- dt->fMonth = SkToU8(st.wMonth);
- dt->fDayOfWeek = SkToU8(st.wDayOfWeek);
- dt->fDay = SkToU8(st.wDay);
- dt->fHour = SkToU8(st.wHour);
- dt->fMinute = SkToU8(st.wMinute);
- dt->fSecond = SkToU8(st.wSecond);
- }
-}
-#endif//defined(SK_BUILD_FOR_WIN32)
« no previous file with comments | « src/ports/SkTime_Unix.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698