diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 2001-03-18 11:58:15 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 2001-03-18 11:58:15 +0000 |
| commit | faeb1b822a2ec18e5d4e6e47e46264210fbab0f3 (patch) | |
| tree | a236851a628fab2447a6a4afab45f757bf7fc439 /lib/libc/stdtime/strptime.c | |
| parent | 989efc86f57471a7abba625ad4a6a06e96b7744a (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdtime/strptime.c')
| -rw-r--r-- | lib/libc/stdtime/strptime.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/libc/stdtime/strptime.c b/lib/libc/stdtime/strptime.c index 58ae5170d332..b39176dc12b9 100644 --- a/lib/libc/stdtime/strptime.c +++ b/lib/libc/stdtime/strptime.c @@ -141,7 +141,6 @@ label: break; case 'c': - /* NOTE: c_fmt is hardcoded in timelocal.c */ buf = _strptime(buf, tptr->c_fmt, tm); if (buf == 0) return 0; @@ -166,10 +165,22 @@ label: goto label; case 'F': + if (!Ealternative) + buf = _strptime(buf, "%Y-%m-%d", tm); + else + buf = _strptime(buf, + *(tptr->md_order) == 'd' ? + "%e %B" : "%B %e", tm); + if (buf == 0) + return 0; + break; + case 'f': if (!Ealternative) break; - buf = _strptime(buf, (c == 'f') ? tptr->Ef_fmt : tptr->EF_fmt, tm); + buf = _strptime(buf, + *(tptr->md_order) == 'd' ? "%e %b" : "%b %e", + tm); if (buf == 0) return 0; break; |
