From: janp Date: Tue, 10 Apr 2001 17:05:43 +0000 (-0700) Subject: [svn] ftp_parse_winnt_ls(): Made the fix for AM/PM more effective. X-Git-Tag: v1.13~2193 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=568b5842714d0da3e9ad50e84cf09ba55c74572c [svn] ftp_parse_winnt_ls(): Made the fix for AM/PM more effective. --- diff --git a/src/ftp-ls.c b/src/ftp-ls.c index e65ddb2c..ca7f43f5 100644 --- a/src/ftp-ls.c +++ b/src/ftp-ls.c @@ -459,8 +459,8 @@ ftp_parse_winnt_ls (const char *file) /* Adjust hour from AM/PM. Just for the record, the sequence goes 11:00AM, 12:00PM, 01:00PM ... 11:00PM, 12:00AM, 01:00AM . */ tok+=2; - if ((*tok == 'A') && (hour == 12)) hour = 0; - else if ((*tok == 'P') && (hour < 12)) hour += 12; + if (hour == 12) hour = 0; + if (*tok == 'P') hour += 12; DEBUGP(("YYYY/MM/DD HH:MM - %d/%02d/%02d %02d:%02d\n", year+1900, month, day, hour, min));