ucrtbase: Asctime() uses space-padding for day of month as seen in C89.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8b10fb8758
commit
f4ddd3190a
|
@ -1349,9 +1349,16 @@ static char* asctime_buf(char *buf, const struct MSVCRT_tm *mstm)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#if _MSVCR_VER>=140
|
||||
/* C89 (4.12.3.1) uses space-padding for day of month. */
|
||||
MSVCRT__snprintf(buf, 26, "%s %s %2d %02d:%02d:%02d %c%03d\n", wday[mstm->tm_wday],
|
||||
month[mstm->tm_mon], mstm->tm_mday, mstm->tm_hour, mstm->tm_min,
|
||||
mstm->tm_sec, '1'+(mstm->tm_year+900)/1000, (900+mstm->tm_year)%1000);
|
||||
#else
|
||||
MSVCRT__snprintf(buf, 26, "%s %s %02d %02d:%02d:%02d %c%03d\n", wday[mstm->tm_wday],
|
||||
month[mstm->tm_mon], mstm->tm_mday, mstm->tm_hour, mstm->tm_min,
|
||||
mstm->tm_sec, '1'+(mstm->tm_year+900)/1000, (900+mstm->tm_year)%1000);
|
||||
#endif
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
|
@ -762,7 +762,7 @@ static void test_asctime(void)
|
|||
}
|
||||
|
||||
ret = p_asctime(&epoch);
|
||||
todo_wine ok(!strcmp(ret, "Thu Jan 1 00:00:00 1970\n"), "asctime returned %s\n", ret);
|
||||
ok(!strcmp(ret, "Thu Jan 1 00:00:00 1970\n"), "asctime returned %s\n", ret);
|
||||
}
|
||||
|
||||
START_TEST(misc)
|
||||
|
|
Loading…
Reference in New Issue