mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-19 15:31:53 +00:00
fmt: Replace deprecated fmt::localtime
usage with Common::LocalTime
This commit is contained in:
parent
1c9389a1fb
commit
4b65cc9a4c
9 changed files with 36 additions and 23 deletions
|
@ -25,6 +25,7 @@
|
|||
#include "Common/Logging/Log.h"
|
||||
#include "Common/ScopeGuard.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Common/TimeUtil.h"
|
||||
|
||||
#include "Core/Config/MainSettings.h"
|
||||
|
||||
|
@ -95,12 +96,7 @@ int SDCardDiskIOCtl(File::IOFile* image, u8 pdrv, u8 cmd, void* buff)
|
|||
u32 GetSystemTimeFAT()
|
||||
{
|
||||
const std::time_t time = std::time(nullptr);
|
||||
std::tm tm;
|
||||
#ifdef _WIN32
|
||||
localtime_s(&tm, &time);
|
||||
#else
|
||||
localtime_r(&time, &tm);
|
||||
#endif
|
||||
std::tm tm = *Common::LocalTime(time);
|
||||
|
||||
DWORD fattime = 0;
|
||||
fattime |= (tm.tm_year - 80) << 25;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue