Skip to content

Commit 3ecd98e

Browse files
committed
change deprecated fmt::localtime to std::localtime
1 parent e90d74d commit 3ecd98e

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/gui/gui.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2418,11 +2418,11 @@ bool PCSX::GUI::about() {
24182418
clip::set_text(
24192419
fmt::format("Version: {}\nBuild: {}\nChangeset: {}\nDate & time: {:%Y-%m-%d %H:%M:%S}",
24202420
version.version, version.buildId.value(), version.changeset,
2421-
fmt::localtime(version.timestamp)));
2421+
*std::localtime(&version.timestamp)));
24222422
} else {
24232423
clip::set_text(fmt::format("Version: {}\nChangeset: {}\nDate & time: {:%Y-%m-%d %H:%M:%S}",
24242424
version.version, version.changeset,
2425-
fmt::localtime(version.timestamp)));
2425+
*std::localtime(&version.timestamp)));
24262426
}
24272427
}
24282428
ImGui::Text(_("Version: %s"), version.version.c_str());
@@ -2434,7 +2434,7 @@ bool PCSX::GUI::about() {
24342434
if (ImGui::SmallButton(version.changeset.c_str())) {
24352435
openUrl(fmt::format("https://github.com/grumpycoders/pcsx-redux/commit/{}", version.changeset));
24362436
}
2437-
std::tm tm = fmt::localtime(version.timestamp);
2437+
std::tm tm = *std::localtime(&version.timestamp);
24382438
std::string timestamp = fmt::format("{:%Y-%m-%d %H:%M:%S}", tm);
24392439
ImGui::Text(_("Date & time: %s"), timestamp.c_str());
24402440
}

src/main/main.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ int pcsxMain(int argc, char **argv) {
218218
fmt::print(
219219
"{{\n \"version\": \"{}\",\n \"changeset\": \"{}\",\n \"timestamp\": \"{}\",\n \"timestampDecoded\": "
220220
"\"{:%Y-%m-%d %H:%M:%S}\"\n}}\n",
221-
version.version, version.changeset, version.timestamp, fmt::localtime(version.timestamp));
221+
version.version, version.changeset, version.timestamp, *std::localtime(&version.timestamp));
222222
return 0;
223223
}
224224

0 commit comments

Comments
 (0)