From 9ed82a280e8f22dbd119b4b7becd3582b50f3ffa Mon Sep 17 00:00:00 2001 From: Kelebek1 Date: Tue, 30 Jan 2024 19:08:47 +0000 Subject: Remove a few hacks for clock setups, which seem to no longer be needed, but fix network clock to local clock on every boot. Also fix some logging strings. --- src/core/hle/service/psc/time/common.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/core/hle/service/psc/time/common.h') diff --git a/src/core/hle/service/psc/time/common.h b/src/core/hle/service/psc/time/common.h index 596828b8b..3e13144a0 100644 --- a/src/core/hle/service/psc/time/common.h +++ b/src/core/hle/service/psc/time/common.h @@ -189,7 +189,7 @@ struct fmt::formatter : fmt::formatter template auto format(const Service::PSC::Time::SteadyClockTimePoint& time_point, FormatContext& ctx) const { - return fmt::format_to(ctx.out(), "time_point={}", time_point.time_point); + return fmt::format_to(ctx.out(), "[time_point={}]", time_point.time_point); } }; @@ -197,7 +197,7 @@ template <> struct fmt::formatter : fmt::formatter { template auto format(const Service::PSC::Time::SystemClockContext& context, FormatContext& ctx) const { - return fmt::format_to(ctx.out(), "offset={} steady_time_point={}", context.offset, + return fmt::format_to(ctx.out(), "[offset={} steady_time_point={}]", context.offset, context.steady_time_point.time_point); } }; @@ -206,8 +206,9 @@ template <> struct fmt::formatter : fmt::formatter { template auto format(const Service::PSC::Time::CalendarTime& calendar, FormatContext& ctx) const { - return fmt::format_to(ctx.out(), "{}/{}/{} {}:{}:{}", calendar.day, calendar.month, - calendar.year, calendar.hour, calendar.minute, calendar.second); + return fmt::format_to(ctx.out(), "[{:02}/{:02}/{:04} {:02}:{:02}:{:02}]", calendar.day, + calendar.month, calendar.year, calendar.hour, calendar.minute, + calendar.second); } }; @@ -217,7 +218,7 @@ struct fmt::formatter template auto format(const Service::PSC::Time::CalendarAdditionalInfo& additional, FormatContext& ctx) const { - return fmt::format_to(ctx.out(), "weekday={} yearday={} name={} is_dst={} ut_offset={}", + return fmt::format_to(ctx.out(), "[weekday={} yearday={} name={} is_dst={} ut_offset={}]", additional.day_of_week, additional.day_of_year, additional.name.data(), additional.is_dst, additional.ut_offset); } @@ -227,8 +228,7 @@ template <> struct fmt::formatter : fmt::formatter { template auto format(const Service::PSC::Time::LocationName& name, FormatContext& ctx) const { - std::string_view n{name.data(), name.size()}; - return formatter::format(n, ctx); + return formatter::format(name.data(), ctx); } }; @@ -236,8 +236,7 @@ template <> struct fmt::formatter : fmt::formatter { template auto format(const Service::PSC::Time::RuleVersion& version, FormatContext& ctx) const { - std::string_view v{version.data(), version.size()}; - return formatter::format(v, ctx); + return formatter::format(version.data(), ctx); } }; @@ -247,10 +246,11 @@ struct fmt::formatter : fmt::formatter auto format(const Service::PSC::Time::ContinuousAdjustmentTimePoint& time_point, FormatContext& ctx) const { return fmt::format_to(ctx.out(), - "rtc_offset={} diff_scale={} shift_amount={} lower={} upper={}", + "[rtc_offset={} diff_scale={} shift_amount={} lower={} upper={}]", time_point.rtc_offset, time_point.diff_scale, time_point.shift_amount, time_point.lower, time_point.upper); } -- cgit v1.2.3