Merge pull request #13160 from liamwhite/time

glue: load initial year setting as s32
This commit is contained in:
Narr the Reg 2024-02-25 08:47:16 -06:00 committed by GitHub
commit 9e27dbb53b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -51,16 +51,17 @@ s64 CalendarTimeToEpoch(Service::PSC::Time::CalendarTime calendar) {
}
s64 GetEpochTimeFromInitialYear(std::shared_ptr<Service::Set::ISystemSettingsServer>& set_sys) {
s32 year{2000};
set_sys->GetSettingsItemValueImpl(year, "time", "standard_user_clock_initial_year");
Service::PSC::Time::CalendarTime calendar{
.year = 2000,
.year = static_cast<s16>(year),
.month = 1,
.day = 1,
.hour = 0,
.minute = 0,
.second = 0,
};
set_sys->GetSettingsItemValueImpl<s16>(calendar.year, "time",
"standard_user_clock_initial_year");
return CalendarTimeToEpoch(calendar);
}