[PR #3138] [CLOSED] Fix deprecated localtime warning in savedata dialog #3252

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

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3138
Author: @dalathegreat
Created: 6/21/2025
Status: Closed

Base: mainHead: main


📝 Commits (3)

  • 1bff425 fix(savedata): replace deprecated fmt::localtime with modern chrono formatting
  • 466ebbf Add MacOS fallback ifdef
  • 520532e Clang formatting

📊 Changes

1 file changed (+6 additions, -1 deletions)

View changed files

📝 src/core/libraries/save_data/dialog/savedatadialog_ui.cpp (+6 -1)

📄 Description

What

This PR replaces fmt::localtime(std::chrono::system_clock::to_time_t(...)) with direct std::chrono formatting

Why

It should be possible to compile without deprecation warnings

image

How

The change is purely technical (no functionality change)

  • Output format remains identical (%d %b, %Y %R)
  • Uses more modern C++ best practices
  • Requires C++17 (but project already uses it)

Further improvements; This fixes Windows and Linux builds, MacOS is still built the old way.


🔄 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/3138 **Author:** [@dalathegreat](https://github.com/dalathegreat) **Created:** 6/21/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (3) - [`1bff425`](https://github.com/shadps4-emu/shadPS4/commit/1bff42520ef2c5f8c31916b61dd0bafee8da21a0) fix(savedata): replace deprecated fmt::localtime with modern chrono formatting - [`466ebbf`](https://github.com/shadps4-emu/shadPS4/commit/466ebbf6cd5ab7218ee027751e99f86041bec4f6) Add MacOS fallback ifdef - [`520532e`](https://github.com/shadps4-emu/shadPS4/commit/520532eddff26a2b9e9787db73884f539815dbaa) Clang formatting ### 📊 Changes **1 file changed** (+6 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/save_data/dialog/savedatadialog_ui.cpp` (+6 -1) </details> ### 📄 Description ### What This PR replaces fmt::localtime(std::chrono::system_clock::to_time_t(...)) with direct std::chrono formatting ### Why It should be possible to compile without deprecation warnings ![image](https://github.com/user-attachments/assets/ed8d2708-010c-431b-81e6-2dd5d0a0e574) ### How The change is purely technical (no functionality change) - Output format remains identical (%d %b, %Y %R) - Uses more modern C++ best practices - Requires C++17 (but project already uses it) Further improvements; This fixes Windows and Linux builds, MacOS is still built the old way. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:03:00 +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#3252
No description provided.