#define CTIME_BUFSIZ 26
#define ISO_BUFSIZ 42
-int strtimeval_iso(struct timeval *tv, int flags, char *buf, size_t bufsz);
-int strtm_iso(struct tm *tm, int flags, char *buf, size_t bufsz);
+int strtimeval_iso(const struct timeval *tv, int flags, char *buf, size_t bufsz);
+int strtm_iso(const struct tm *tm, int flags, char *buf, size_t bufsz);
int strtime_iso(const time_t *t, int flags, char *buf, size_t bufsz);
#define UL_SHORTTIME_THISYEAR_HHMM (1 << 1)
#endif
}
-static int format_iso_time(struct tm *tm, suseconds_t usec, int flags, char *buf, size_t bufsz)
+static int format_iso_time(const struct tm *tm, suseconds_t usec, int flags, char *buf, size_t bufsz)
{
char *p = buf;
int len;
}
/* timeval to ISO 8601 */
-int strtimeval_iso(struct timeval *tv, int flags, char *buf, size_t bufsz)
+int strtimeval_iso(const struct timeval *tv, int flags, char *buf, size_t bufsz)
{
struct tm tm;
struct tm *rc;
}
/* struct tm to ISO 8601 */
-int strtm_iso(struct tm *tm, int flags, char *buf, size_t bufsz)
+int strtm_iso(const struct tm *tm, int flags, char *buf, size_t bufsz)
{
return format_iso_time(tm, 0, flags, buf, bufsz);
}