Merge pull request #11435 from techydude0713/wc24-utc-fix
NetKDTime: Use UTC based timestamp instead of localtime.
This commit is contained in:
commit
12431a83ba
|
@ -91,7 +91,9 @@ u64 NetKDTimeDevice::GetAdjustedUTC() const
|
|||
{
|
||||
using namespace ExpansionInterface;
|
||||
|
||||
const u32 emulated_time = CEXIIPL::GetEmulatedTime(CEXIIPL::UNIX_EPOCH);
|
||||
const time_t current_time = CEXIIPL::GetEmulatedTime(CEXIIPL::UNIX_EPOCH);
|
||||
tm* const gm_time = gmtime(¤t_time);
|
||||
const u32 emulated_time = mktime(gm_time);
|
||||
return u64(s64(emulated_time) + utcdiff);
|
||||
}
|
||||
|
||||
|
@ -99,7 +101,9 @@ void NetKDTimeDevice::SetAdjustedUTC(u64 wii_utc)
|
|||
{
|
||||
using namespace ExpansionInterface;
|
||||
|
||||
const u32 emulated_time = CEXIIPL::GetEmulatedTime(CEXIIPL::UNIX_EPOCH);
|
||||
const time_t current_time = CEXIIPL::GetEmulatedTime(CEXIIPL::UNIX_EPOCH);
|
||||
tm* const gm_time = gmtime(¤t_time);
|
||||
const u32 emulated_time = mktime(gm_time);
|
||||
utcdiff = s64(emulated_time - wii_utc);
|
||||
}
|
||||
} // namespace IOS::HLE
|
||||
|
|
Loading…
Reference in New Issue