mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
convert AM/PM string from local encoding to utf8
This commit is contained in:
parent
017d1b710e
commit
7366a46bc2
@ -24,6 +24,7 @@
|
||||
#include <file/file_path.h>
|
||||
#include <streams/file_stream.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <encodings/utf.h>
|
||||
|
||||
#ifdef WIIU
|
||||
#include <wiiu/os/energy.h>
|
||||
@ -383,8 +384,20 @@ void menu_display_timedate(menu_display_ctx_datetime_t *datetime)
|
||||
strftime(datetime->s, datetime->len,
|
||||
"%r", localtime(&time_));
|
||||
#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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user