summaryrefslogtreecommitdiff
path: root/lib/libc/stdtime/strftime.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2001-03-18 11:58:15 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2001-03-18 11:58:15 +0000
commitfaeb1b822a2ec18e5d4e6e47e46264210fbab0f3 (patch)
treea236851a628fab2447a6a4afab45f757bf7fc439 /lib/libc/stdtime/strftime.c
parent989efc86f57471a7abba625ad4a6a06e96b7744a (diff)
Notes
Diffstat (limited to 'lib/libc/stdtime/strftime.c')
-rw-r--r--lib/libc/stdtime/strftime.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/libc/stdtime/strftime.c b/lib/libc/stdtime/strftime.c
index e54ea893a0a4..a4cdc86a51f8 100644
--- a/lib/libc/stdtime/strftime.c
+++ b/lib/libc/stdtime/strftime.c
@@ -123,7 +123,6 @@ label:
"%02d", pt, ptlim);
continue;
case 'c':
- /* NOTE: c_fmt is hardcoded in timelocal.c */
pt = _fmt(tptr->c_fmt, t, pt, ptlim);
continue;
case 'D':
@@ -162,12 +161,17 @@ label:
case 'f':
if (!Ealternative)
break;
- pt = _fmt(tptr->Ef_fmt, t, pt, ptlim);
+ pt = _fmt(*(tptr->md_order) == 'd' ?
+ "%e %b" : "%b %e",
+ t, pt, ptlim);
continue;
case 'F':
if (!Ealternative)
- break;
- pt = _fmt(tptr->EF_fmt, t, pt, ptlim);
+ pt = _fmt("%Y-%m-%d", t, pt, ptlim);
+ else
+ pt = _fmt(*(tptr->md_order) == 'd' ?
+ "%e %B" : "%B %e",
+ t, pt, ptlim);
continue;
case 'H':
pt = _conv(t->tm_hour, "%02d", pt, ptlim);