From 882ae41aee00f7d015312f0245a213409d75998a Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 25 Nov 2015 12:52:36 -0600 Subject: [PATCH] If CONFIG_LIBC_LOCALTIME or CONFIG_TIME_EXTENDED are defined, then the NSH date command should also show the day ofo the week --- nshlib/nsh_timcmds.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nshlib/nsh_timcmds.c b/nshlib/nsh_timcmds.c index 55fa88a78..d09c54c1d 100644 --- a/nshlib/nsh_timcmds.c +++ b/nshlib/nsh_timcmds.c @@ -108,7 +108,11 @@ static inline int date_month(FAR const char *abbrev) #ifndef CONFIG_NSH_DISABLE_DATE static inline int date_showtime(FAR struct nsh_vtbl_s *vtbl, FAR const char *name) { +#if defined(CONFIG_LIBC_LOCALTIME) || defined(CONFIG_TIME_EXTENDED) + static const char format[] = "%a, %b %d %H:%M:%S %Y"; +#else static const char format[] = "%b %d %H:%M:%S %Y"; +#endif struct timespec ts; struct tm tm; char timbuf[MAX_TIME_STRING];