mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-03 11:13:44 +01:00
Use system time format on savedata aswell
This commit is contained in:
1 parent
31648acc2b
commit
2c4eb82137
1 file changed
+14
-2
+14
-2
@@ -40,6 +40,7 @@
|
||||
#include "Core/Loaders.h"
|
||||
#include "Core/SaveState.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/HLE/sceUtility.h"
|
||||
|
||||
class SavedataButton;
|
||||
|
||||
@@ -47,8 +48,19 @@ std::string GetFileDateAsString(std::string filename) {
|
||||
tm time;
|
||||
if (File::GetModifTime(filename, time)) {
|
||||
char buf[256];
|
||||
// TODO: Use local time format? Americans and some others might not like ISO standard :)
|
||||
strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", &time);
|
||||
switch (g_Config.iDateFormat) {
|
||||
case PSP_SYSTEMPARAM_DATE_FORMAT_YYYYMMDD:
|
||||
strftime(buf, sizeof(buf), "%Y-%m-%d %H:%M:%S", &time);
|
||||
break;
|
||||
case PSP_SYSTEMPARAM_DATE_FORMAT_MMDDYYYY:
|
||||
strftime(buf, sizeof(buf), "%m-%d-%Y %H:%M:%S", &time);
|
||||
break;
|
||||
case PSP_SYSTEMPARAM_DATE_FORMAT_DDMMYYYY:
|
||||
strftime(buf, sizeof(buf), "%d-%m-%Y %H:%M:%S", &time);
|
||||
break;
|
||||
default: // Should never happen
|
||||
return "";
|
||||
}
|
||||
return std::string(buf);
|
||||
}
|
||||
return "";
|
||||
|
||||
Reference in new issue
Block a user