mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
Merge pull request #1 from bparker06/ampm_mb
convert AM/PM string from local encoding to utf8
This commit is contained in:
commit
61285cfd4b
@ -24,6 +24,7 @@
|
|||||||
#include <file/file_path.h>
|
#include <file/file_path.h>
|
||||||
#include <streams/file_stream.h>
|
#include <streams/file_stream.h>
|
||||||
#include <string/stdstring.h>
|
#include <string/stdstring.h>
|
||||||
|
#include <encodings/utf.h>
|
||||||
|
|
||||||
#ifdef WIIU
|
#ifdef WIIU
|
||||||
#include <wiiu/os/energy.h>
|
#include <wiiu/os/energy.h>
|
||||||
@ -383,8 +384,20 @@ void menu_display_timedate(menu_display_ctx_datetime_t *datetime)
|
|||||||
strftime(datetime->s, datetime->len,
|
strftime(datetime->s, datetime->len,
|
||||||
"%r", localtime(&time_));
|
"%r", localtime(&time_));
|
||||||
#else
|
#else
|
||||||
strftime(datetime->s, datetime->len,
|
{
|
||||||
"%I:%M:%S %p", localtime(&time_));
|
char *local;
|
||||||
|
|
||||||
|
strftime(datetime->s, datetime->len,
|
||||||
|
|
||||||
|
"%I:%M:%S %p", localtime(&time_));
|
||||||
|
local = local_to_utf8_string_alloc(datetime->s);
|
||||||
|
|
||||||
|
if (local)
|
||||||
|
{
|
||||||
|
strlcpy(datetime->s, local, datetime->len);
|
||||||
|
free(local);
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user