[PR #1574] [MERGED] savedatadialog_ui: Use fmt::localtime instead of formatting std::chrono::local_time #2177

Closed
opened 2026-02-27 21:15:29 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/1574
Author: @squidbus
Created: 11/22/2024
Status: Merged
Merged: 11/22/2024
Merged by: @georgemoralis

Base: mainHead: time-fix


📝 Commits (1)

  • df0a2f1 savedatadialog_ui: Use fmt::localtime instead of formatting std::chrono::local_time

📊 Changes

1 file changed (+3 additions, -33 deletions)

View changed files

📝 src/core/libraries/save_data/dialog/savedatadialog_ui.cpp (+3 -33)

📄 Description

Formatting std::chrono::local_time is not compiling right on some Linux systems, probably to do with the standard library version check that fmt has for it.

Instead we can just convert to time_t and use fmt::localtime. This also means we can eliminate all the extra code using std::chrono time zones and the corresponding Mac compatibility code using the date library.

Tested in a few games and the save dialog times still look correct.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/1574 **Author:** [@squidbus](https://github.com/squidbus) **Created:** 11/22/2024 **Status:** ✅ Merged **Merged:** 11/22/2024 **Merged by:** [@georgemoralis](https://github.com/georgemoralis) **Base:** `main` ← **Head:** `time-fix` --- ### 📝 Commits (1) - [`df0a2f1`](https://github.com/shadps4-emu/shadPS4/commit/df0a2f13658b511f4b878be052d15ef037eece11) savedatadialog_ui: Use fmt::localtime instead of formatting std::chrono::local_time ### 📊 Changes **1 file changed** (+3 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/save_data/dialog/savedatadialog_ui.cpp` (+3 -33) </details> ### 📄 Description Formatting `std::chrono::local_time` is not compiling right on some Linux systems, probably to do with the standard library version check that fmt has for it. Instead we can just convert to `time_t` and use `fmt::localtime`. This also means we can eliminate all the extra code using `std::chrono` time zones and the corresponding Mac compatibility code using the date library. Tested in a few games and the save dialog times still look correct. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:15:29 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#2177
No description provided.