summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-12-11 12:04:41 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-01-07 08:45:12 +0100
commit6eb5d78419299d01f500140dd9400a68725e142b (patch)
tree08740da960aa8f512689a3924c986af6af37cf4d /include
parenta9e7e68279de3aec38b038211a15a80cfc612c4e (diff)
downloadbarebox-6eb5d78419299d01f500140dd9400a68725e142b.tar.gz
barebox-6eb5d78419299d01f500140dd9400a68725e142b.tar.xz
hwclock command: use format like the Linux tool does
Print three-letter abbreviations of the days and months. With a fixup by Andrey Smirnov: | common/date.c: Fix off-by-one error | | As per http://pubs.opengroup.org/onlinepubs/007908775/xsh/time.h.html | 'tm_wday' is zero indexed with zero representing Sunday, this is also | corroborated by the code in rtc_time_to_tm() which used 4 to represent | Thursday. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/rtc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/rtc.h b/include/rtc.h
index e2414fb7b1..600dc46c41 100644
--- a/include/rtc.h
+++ b/include/rtc.h
@@ -55,4 +55,6 @@ unsigned long mktime (unsigned int, unsigned int, unsigned int,
extern struct rtc_device *rtc_lookup(const char *name);
+const char *time_str(struct rtc_time *tm);
+
#endif /* _RTC_H_ */