| Summary: | Re: strptime: %s formatting missing (patch) | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Maxim Konovalov <maxim> |
| Component: | bin | Assignee: | greid |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | CC: | thz |
| Priority: | Normal | ||
| Version: | 1.0-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
State Changed From-To: open->closed Mailing list message; not a PR Responsible Changed From-To: gnats-admin->greid Misfiled |
Just another patch: --- strptime.c.orig Wed Jun 27 16:09:11 2001 +++ strptime.c Wed Jun 27 17:08:12 2001 @@ -86,6 +86,7 @@ static char * _strptime(const char *buf, const char *fmt, struct tm *tm) { + long l; char c; const char *ptr; int i, @@ -459,6 +460,16 @@ if (*buf != 0 && isspace((unsigned char)*buf)) while (*ptr != 0 && !isspace((unsigned char)*ptr)) ptr++; + break; + + case 's': + for (l = 0; *buf != 0 && isdigit((unsigned char)*buf); buf++) { + l *= 10; + l += *buf - '0'; + } + + (void)localtime_r(&l, tm); + break; case 'Y': -- Maxim Konovalov, MAcomnet, Internet-Intranet Dept., system engineer phone: +7 (095) 796-9079, mailto: maxim@macomnet.ru