mirror of
https://github.com/yuzu-emu/yuzu-mainline
synced 2024-11-22 22:53:36 +00:00
time_manager: Don't offset RTC by system time zone
This causes the emulated system's universal time to be on the user's clock, and the user time to be off if they set a time zone. time_manager: Remove GetExternalRtcTime
This commit is contained in:
parent
c378cbbc2d
commit
9e2164be74
1 changed files with 1 additions and 5 deletions
|
@ -22,10 +22,6 @@ s64 GetSecondsSinceEpoch() {
|
||||||
return std::chrono::duration_cast<std::chrono::seconds>(time_since_epoch).count() +
|
return std::chrono::duration_cast<std::chrono::seconds>(time_since_epoch).count() +
|
||||||
Settings::values.custom_rtc_differential;
|
Settings::values.custom_rtc_differential;
|
||||||
}
|
}
|
||||||
|
|
||||||
s64 GetExternalRtcValue() {
|
|
||||||
return GetSecondsSinceEpoch() + TimeManager::GetExternalTimeZoneOffset();
|
|
||||||
}
|
|
||||||
} // Anonymous namespace
|
} // Anonymous namespace
|
||||||
|
|
||||||
struct TimeManager::Impl final {
|
struct TimeManager::Impl final {
|
||||||
|
@ -43,7 +39,7 @@ struct TimeManager::Impl final {
|
||||||
std::make_shared<Clock::EphemeralNetworkSystemClockContextWriter>()},
|
std::make_shared<Clock::EphemeralNetworkSystemClockContextWriter>()},
|
||||||
time_zone_content_manager{system} {
|
time_zone_content_manager{system} {
|
||||||
|
|
||||||
const auto system_time{Clock::TimeSpanType::FromSeconds(GetExternalRtcValue())};
|
const auto system_time{Clock::TimeSpanType::FromSeconds(GetSecondsSinceEpoch())};
|
||||||
SetupStandardSteadyClock(system, Common::UUID::MakeRandom(), system_time, {}, {});
|
SetupStandardSteadyClock(system, Common::UUID::MakeRandom(), system_time, {}, {});
|
||||||
SetupStandardLocalSystemClock(system, {}, system_time.ToSeconds());
|
SetupStandardLocalSystemClock(system, {}, system_time.ToSeconds());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue