time.h: Add localtime prototypes; NSH: Correct test for gmtime_r return value

This commit is contained in:
Gregory Nutt 2015-04-21 09:26:18 -06:00
parent eedce63bd6
commit 4608544f65

View File

@ -196,6 +196,10 @@ int clock_getres(clockid_t clockid, FAR struct timespec *res);
time_t mktime(FAR struct tm *tp); time_t mktime(FAR struct tm *tp);
FAR struct tm *gmtime(FAR const time_t *timer); FAR struct tm *gmtime(FAR const time_t *timer);
FAR struct tm *gmtime_r(FAR const time_t *timer, FAR struct tm *result); FAR struct tm *gmtime_r(FAR const time_t *timer, FAR struct tm *result);
#ifdef CONFIG_LIBC_LOCALTIME
FAR struct tm *localtime(FAR const time_t *timer);
FAR struct tm *localtime_r(FAR const time_t *timer, FAR struct tm *result);
#endif
size_t strftime(FAR char *s, size_t max, FAR const char *format, size_t strftime(FAR char *s, size_t max, FAR const char *format,
FAR const struct tm *tm); FAR const struct tm *tm);