From b00d5769da73937b54cfd70c2cce4a7e502d868a Mon Sep 17 00:00:00 2001 From: Duane Clark Date: Fri, 15 Apr 2005 16:10:39 +0000 Subject: [PATCH] Hour '0' corresponds to 12AM. --- dlls/comctl32/datetime.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/dlls/comctl32/datetime.c b/dlls/comctl32/datetime.c index 001a35867db..fefccc5768c 100644 --- a/dlls/comctl32/datetime.c +++ b/dlls/comctl32/datetime.c @@ -339,10 +339,22 @@ DATETIME_ReturnTxt (DATETIME_INFO *infoPtr, int count, LPWSTR result, int result GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDAYNAME1+(date.wDayOfWeek+6)%7, result, resultSize); break; case ONEDIGIT12HOUR: - wsprintfW (result, fmt_dW, date.wHour - (date.wHour > 12 ? 12 : 0)); + if (date.wHour == 0) { + result[0] = '1'; + result[1] = '2'; + result[2] = 0; + } + else + wsprintfW (result, fmt_dW, date.wHour - (date.wHour > 12 ? 12 : 0)); break; case TWODIGIT12HOUR: - wsprintfW (result, fmt__2dW, date.wHour - (date.wHour > 12 ? 12 : 0)); + if (date.wHour == 0) { + result[0] = '1'; + result[1] = '2'; + result[2] = 0; + } + else + wsprintfW (result, fmt__2dW, date.wHour - (date.wHour > 12 ? 12 : 0)); break; case ONEDIGIT24HOUR: wsprintfW (result, fmt_dW, date.wHour);