Fix windows compilability

This commit is contained in:
est31 2015-06-07 15:06:13 +02:00
parent 8d61817293
commit 64704ecbc5
4 changed files with 19 additions and 29 deletions

View file

@ -442,10 +442,14 @@ String OSWinrt::get_name() {
return "WinRT";
}
OS::Date OSWinrt::get_date() const {
OS::Date OSWinrt::get_date(bool utc) const {
SYSTEMTIME systemtime;
GetLocalTime(&systemtime);
if (utc)
GetSystemTime(&systemtime);
else
GetLocalTime(&systemtime);
Date date;
date.day=systemtime.wDay;
date.month=Month(systemtime.wMonth);
@ -485,14 +489,11 @@ OS::TimeZoneInfo OS_Windows::get_time_zone_info() const {
return ret;
}
uint64_t OSWinrt::get_unix_time(bool utc) const {
uint64_t OSWinrt::get_unix_time() const {
FILETIME ft;
SYSTEMTIME st;
if (utc)
GetSystemTime(&systemtime);
else
GetLocalTime(&systemtime);
GetSystemTime(&systemtime);
SystemTimeToFileTime(&st, &ft);
SYSTEMTIME ep;