aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/service/psc/time/common.h
diff options
context:
space:
mode:
authorKelebek1 <eeeedddccc@hotmail.co.uk>2024-01-30 19:08:47 +0000
committerKelebek1 <eeeedddccc@hotmail.co.uk>2024-01-31 01:41:59 +0000
commit9ed82a280e8f22dbd119b4b7becd3582b50f3ffa (patch)
tree723a135615c95aeee9a775742466eab86f54ce82 /src/core/hle/service/psc/time/common.h
parent2e65616761944c1aa59d6ea4b3abc3ec5aebbe11 (diff)
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.
Diffstat (limited to 'src/core/hle/service/psc/time/common.h')
-rw-r--r--src/core/hle/service/psc/time/common.h24
1 files changed, 12 insertions, 12 deletions
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<Service::PSC::Time::SteadyClockTimePoint> : fmt::formatter
template <typename FormatContext>
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<Service::PSC::Time::SystemClockContext> : fmt::formatter<fmt::string_view> {
template <typename FormatContext>
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<Service::PSC::Time::CalendarTime> : fmt::formatter<fmt::string_view> {
template <typename FormatContext>
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<Service::PSC::Time::CalendarAdditionalInfo>
template <typename FormatContext>
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<Service::PSC::Time::LocationName> : fmt::formatter<fmt::string_view> {
template <typename FormatContext>
auto format(const Service::PSC::Time::LocationName& name, FormatContext& ctx) const {
- std::string_view n{name.data(), name.size()};
- return formatter<string_view>::format(n, ctx);
+ return formatter<string_view>::format(name.data(), ctx);
}
};
@@ -236,8 +236,7 @@ template <>
struct fmt::formatter<Service::PSC::Time::RuleVersion> : fmt::formatter<fmt::string_view> {
template <typename FormatContext>
auto format(const Service::PSC::Time::RuleVersion& version, FormatContext& ctx) const {
- std::string_view v{version.data(), version.size()};
- return formatter<string_view>::format(v, ctx);
+ return formatter<string_view>::format(version.data(), ctx);
}
};
@@ -247,10 +246,11 @@ struct fmt::formatter<Service::PSC::Time::ClockSnapshot> : fmt::formatter<fmt::s
auto format(const Service::PSC::Time::ClockSnapshot& snapshot, FormatContext& ctx) const {
return fmt::format_to(
ctx.out(),
- "user_context={} network_context={} user_time={} network_time={} user_calendar_time={} "
+ "[user_context={} network_context={} user_time={} network_time={} "
+ "user_calendar_time={} "
"network_calendar_time={} user_calendar_additional_time={} "
"network_calendar_additional_time={} steady_clock_time_point={} location={} "
- "is_automatic_correction_enabled={} type={}",
+ "is_automatic_correction_enabled={} type={}]",
snapshot.user_context, snapshot.network_context, snapshot.user_time,
snapshot.network_time, snapshot.user_calendar_time, snapshot.network_calendar_time,
snapshot.user_calendar_additional_time, snapshot.network_calendar_additional_time,
@@ -266,7 +266,7 @@ struct fmt::formatter<Service::PSC::Time::ContinuousAdjustmentTimePoint>
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);
}