diff --git a/asctime.c b/asctime.c index 1a906b6..9d96d77 100644 --- a/asctime.c +++ b/asctime.c @@ -33,9 +33,9 @@ ** but many implementations pad anyway; most likely the standards are buggy. */ #ifdef __GNUC__ -#define ASCTIME_FMT "%.3s %.3s%3d %2.2d:%2.2d:%2.2d %-4s\n" +#define ASCTIME_FMT "%s %s%3d %2.2d:%2.2d:%2.2d %-4s\n" #else /* !defined __GNUC__ */ -#define ASCTIME_FMT "%.3s %.3s%3d %02.2d:%02.2d:%02.2d %-4s\n" +#define ASCTIME_FMT "%s %s%3d %02.2d:%02.2d:%02.2d %-4s\n" #endif /* !defined __GNUC__ */ /* ** For years that are more than four digits we put extra spaces before the year @@ -44,9 +44,9 @@ ** that no output is better than wrong output). */ #ifdef __GNUC__ -#define ASCTIME_FMT_B "%.3s %.3s%3d %2.2d:%2.2d:%2.2d %s\n" +#define ASCTIME_FMT_B "%s %s%3d %2.2d:%2.2d:%2.2d %s\n" #else /* !defined __GNUC__ */ -#define ASCTIME_FMT_B "%.3s %.3s%3d %02.2d:%02.2d:%02.2d %s\n" +#define ASCTIME_FMT_B "%s %s%3d %02.2d:%02.2d:%02.2d %s\n" #endif /* !defined __GNUC__ */ #define STD_ASCTIME_BUF_SIZE 26 @@ -71,10 +71,10 @@ static char buf_asctime[MAX_ASCTIME_BUF_SIZE]; char * asctime_r(register const struct tm *timeptr, char *buf) { - static const char wday_name[][3] = { + static const char wday_name[][4] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; - static const char mon_name[][3] = { + static const char mon_name[][4] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };