Fix for FS#8820 by Christopher Williams - Misformatted time in Rockbox Info

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16899 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2008-03-31 07:37:19 +00:00
parent ec05b66b5d
commit 29cdd30dbc
2 changed files with 7 additions and 4 deletions

View file

@ -183,10 +183,12 @@ static char* info_getname(int selected_item, void *data, char *buffer)
case INFO_TIME:
tm = get_time();
snprintf(buffer, MAX_PATH, "%02d:%02d:%02d %s",
global_settings.timeformat == 0 ? tm->tm_hour : tm->tm_hour-12,
tm->tm_min,
tm->tm_sec,
global_settings.timeformat == 0 ? "" : tm->tm_hour>11 ? "P" : "A");
global_settings.timeformat == 0 ? tm->tm_hour :
((tm->tm_hour + 11) % 12) + 1,
tm->tm_min,
tm->tm_sec,
global_settings.timeformat == 0 ? "" :
tm->tm_hour>11 ? "P" : "A");
break;
case INFO_DATE:
tm = get_time();

View file

@ -383,6 +383,7 @@ Marcel Barbulescu
Phil Light
Rob Purchase
Andreas Müller
Christopher Williams
The libmad team