From 9e2164be74d9049877092771155ba306140a320b Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Sun, 21 May 2023 02:43:15 -0400 Subject: 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 --- src/core/hle/service/time/time_manager.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/core/hle/service/time') diff --git a/src/core/hle/service/time/time_manager.cpp b/src/core/hle/service/time/time_manager.cpp index 28667710e..d5c9e6b5e 100644 --- a/src/core/hle/service/time/time_manager.cpp +++ b/src/core/hle/service/time/time_manager.cpp @@ -22,10 +22,6 @@ s64 GetSecondsSinceEpoch() { return std::chrono::duration_cast(time_since_epoch).count() + Settings::values.custom_rtc_differential; } - -s64 GetExternalRtcValue() { - return GetSecondsSinceEpoch() + TimeManager::GetExternalTimeZoneOffset(); -} } // Anonymous namespace struct TimeManager::Impl final { @@ -43,7 +39,7 @@ struct TimeManager::Impl final { std::make_shared()}, 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, {}, {}); SetupStandardLocalSystemClock(system, {}, system_time.ToSeconds()); -- cgit v1.2.3