summaryrefslogtreecommitdiff
path: root/apps/menus/main_menu.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2008-03-31 07:37:19 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2008-03-31 07:37:19 +0000
commit29cdd30dbc19618b91d8e438a8b208141078f79a (patch)
tree4af6e752594216299aab9433c158d61e94aa045d /apps/menus/main_menu.c
parentec05b66b5d414b21f5c1d303c5707725d83b78c9 (diff)
downloadrockbox-29cdd30dbc19618b91d8e438a8b208141078f79a.tar.gz
rockbox-29cdd30dbc19618b91d8e438a8b208141078f79a.zip
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
Diffstat (limited to 'apps/menus/main_menu.c')
-rw-r--r--apps/menus/main_menu.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/menus/main_menu.c b/apps/menus/main_menu.c
index 7c2e87c410..0278af3668 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)
183 case INFO_TIME: 183 case INFO_TIME:
184 tm = get_time(); 184 tm = get_time();
185 snprintf(buffer, MAX_PATH, "%02d:%02d:%02d %s", 185 snprintf(buffer, MAX_PATH, "%02d:%02d:%02d %s",
186 global_settings.timeformat == 0 ? tm->tm_hour : tm->tm_hour-12, 186 global_settings.timeformat == 0 ? tm->tm_hour :
187 tm->tm_min, 187 ((tm->tm_hour + 11) % 12) + 1,
188 tm->tm_sec, 188 tm->tm_min,
189 global_settings.timeformat == 0 ? "" : tm->tm_hour>11 ? "P" : "A"); 189 tm->tm_sec,
190 global_settings.timeformat == 0 ? "" :
191 tm->tm_hour>11 ? "P" : "A");
190 break; 192 break;
191 case INFO_DATE: 193 case INFO_DATE:
192 tm = get_time(); 194 tm = get_time();