9 asctime_r (const struct tm
*__restrict tim_p
,
10 char *__restrict result
)
12 static const char day_name
[7][3] = {
13 "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
15 static const char mon_name
[12][3] = {
16 "Jan", "Feb", "Mar", "Apr", "May", "Jun",
17 "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
20 siprintf (result
, "%.3s %.3s%3d %.2d:%.2d:%.2d %d\n",
21 day_name
[tim_p
->tm_wday
],
22 mon_name
[tim_p
->tm_mon
],
23 tim_p
->tm_mday
, tim_p
->tm_hour
, tim_p
->tm_min
,
24 tim_p
->tm_sec
, 1900 + tim_p
->tm_year
);