瀏覽代碼

Use local time for both time and date on win

On unix and nacl, both date and time are expressed in local time.
est31 10 年之前
父節點
當前提交
26ea12a873
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 1 1
      platform/windows/os_windows.cpp
  2. 2 2
      platform/winrt/os_winrt.cpp

+ 1 - 1
platform/windows/os_windows.cpp

@@ -1832,7 +1832,7 @@ String OS_Windows::get_name() {
 OS::Date OS_Windows::get_date() const {
 
 	SYSTEMTIME systemtime;
-	GetSystemTime(&systemtime);
+	GetLocalTime(&systemtime);
 	Date date;
 	date.day=systemtime.wDay;
 	date.month=Month(systemtime.wMonth);

+ 2 - 2
platform/winrt/os_winrt.cpp

@@ -445,7 +445,7 @@ String OSWinrt::get_name() {
 OS::Date OSWinrt::get_date() const {
 
 	SYSTEMTIME systemtime;
-	GetSystemTime(&systemtime);
+	GetLocalTime(&systemtime);
 	Date date;
 	date.day=systemtime.wDay;
 	date.month=Month(systemtime.wMonth);
@@ -457,7 +457,7 @@ OS::Date OSWinrt::get_date() const {
 OS::Time OSWinrt::get_time() const {
 
 	SYSTEMTIME systemtime;
-	GetSystemTime(&systemtime);
+	GetLocalTime(&systemtime);
 
 	Time time;
 	time.hour=systemtime.wHour;