Core: Replace Timestamp usage with fmt
This commit is contained in:
@ -23,6 +23,7 @@
|
||||
#include <algorithm>
|
||||
#include <cstdarg>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -539,7 +540,7 @@ void Cheevos::LoginCallback(s32 status_code, const FrontendCommon::HTTPDownloade
|
||||
g_host_interface->GetSettingsInterface()->SetStringValue("Cheevos", "Username", username.c_str());
|
||||
g_host_interface->GetSettingsInterface()->SetStringValue("Cheevos", "Token", login_token.c_str());
|
||||
g_host_interface->GetSettingsInterface()->SetStringValue(
|
||||
"Cheevos", "LoginTimestamp", TinyString::FromFormat("%" PRIu64, Timestamp::Now().AsUnixTimestamp()));
|
||||
"Cheevos", "LoginTimestamp", TinyString::FromFormat("%" PRIu64, static_cast<u64>(std::time(nullptr))));
|
||||
g_host_interface->GetSettingsInterface()->Save();
|
||||
}
|
||||
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
#include "cpu_code_cache.h"
|
||||
#include "cpu_core.h"
|
||||
#include "dma.h"
|
||||
#include "fmt/chrono.h"
|
||||
#include "gpu.h"
|
||||
#include "gte.h"
|
||||
#include "host_display.h"
|
||||
@ -949,11 +950,7 @@ std::string HostInterface::GetProgramDirectoryRelativePath(const char* format, .
|
||||
|
||||
TinyString HostInterface::GetTimestampStringForFileName()
|
||||
{
|
||||
const Timestamp ts(Timestamp::Now());
|
||||
|
||||
TinyString str;
|
||||
ts.ToString(str, "%Y-%m-%d_%H-%M-%S");
|
||||
return str;
|
||||
return TinyString::FromFmt("{:%Y-%m-%d_%H-%M-%S}", fmt::localtime(std::time(nullptr)));
|
||||
}
|
||||
|
||||
std::string HostInterface::GetMemoryCardDirectory() const
|
||||
|
||||
Reference in New Issue
Block a user