diff options
| author | Linus Nielsen Feltzing <linus@haxx.se> | 2008-03-31 07:37:19 +0000 |
|---|---|---|
| committer | Linus Nielsen Feltzing <linus@haxx.se> | 2008-03-31 07:37:19 +0000 |
| commit | 29cdd30dbc19618b91d8e438a8b208141078f79a (patch) | |
| tree | 4af6e752594216299aab9433c158d61e94aa045d | |
| parent | ec05b66b5d414b21f5c1d303c5707725d83b78c9 (diff) | |
| download | rockbox-29cdd30dbc19618b91d8e438a8b208141078f79a.zip rockbox-29cdd30dbc19618b91d8e438a8b208141078f79a.tar.gz rockbox-29cdd30dbc19618b91d8e438a8b208141078f79a.tar.bz2 rockbox-29cdd30dbc19618b91d8e438a8b208141078f79a.tar.xz | |
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
| -rw-r--r-- | apps/menus/main_menu.c | 10 | ||||
| -rw-r--r-- | docs/CREDITS | 1 |
2 files changed, 7 insertions, 4 deletions
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c index 7c2e87c..0278af3 100644 --- a/apps/menus/main_menu.c +++ b/apps/menus/main_menu.c @@ -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(); diff --git a/docs/CREDITS b/docs/CREDITS index b371e5c..5bd1810 100644 --- a/docs/CREDITS +++ b/docs/CREDITS @@ -383,6 +383,7 @@ Marcel Barbulescu Phil Light Rob Purchase Andreas Müller +Christopher Williams The libmad team |