[Base] Added NtSystemClock to_local for quick time conversion to current timezone

- Changed achievement reward time to local time (in UI)
This commit is contained in:
Gliniak
2024-12-26 11:31:37 +01:00
committed by Radosław Gliński
parent c3586bc165
commit bcc3c3172d
2 changed files with 10 additions and 2 deletions

View File

@@ -394,7 +394,7 @@ struct AchievementInfo {
uint32_t gamerscore;
uint32_t image_id;
uint32_t flags;
std::chrono::system_clock::time_point unlock_time;
std::chrono::local_time<std::chrono::system_clock::duration> unlock_time;
bool IsUnlocked() const {
return (flags & static_cast<uint32_t>(AchievementFlags::kAchieved)) ||
@@ -462,7 +462,7 @@ class GameAchievementsDialog final : public XamDialog {
if (entry.IsUnlocked()) {
info.unlock_time =
chrono::WinSystemClock::to_sys(entry.unlock_time.to_time_point());
chrono::WinSystemClock::to_local(entry.unlock_time.to_time_point());
}
achievements_info_.insert({info.id, info});