summaryrefslogtreecommitdiff
path: root/sys/man/2
diff options
context:
space:
mode:
authorgoogle <google@daverabbitz.ath.cx>2012-09-02 23:05:41 +1200
committergoogle <google@daverabbitz.ath.cx>2012-09-02 23:05:41 +1200
commitcdb7bdde96c0147fffe6d568ac7837839f678d8c (patch)
tree07a251e85b5f74287bf65db1d820d8c7fd06fa30 /sys/man/2
parent67e047589a4257145c2507f2e7814a512434306a (diff)
Add isotime() and isodate() functions to libc.
Diffstat (limited to 'sys/man/2')
-rw-r--r--sys/man/2/ctime15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/man/2/ctime b/sys/man/2/ctime
index a4e074343..411f2cd65 100644
--- a/sys/man/2/ctime
+++ b/sys/man/2/ctime
@@ -1,6 +1,6 @@
.TH CTIME 2
.SH NAME
-ctime, localtime, gmtime, asctime, tm2sec, timezone \- convert date and time
+ctime, localtime, gmtime, asctime, tm2sec, timezone, isodate, isotime \- convert date and time
.SH SYNOPSIS
.B #include <u.h>
.br
@@ -23,6 +23,12 @@ char* asctime(Tm *tm)
long tm2sec(Tm *tm)
.PP
.B
+char* isodate(Tm *tm)
+.PP
+.B
+char* isotime(Tm *tm)
+.PP
+.B
/env/timezone
.SH DESCRIPTION
.I Ctime
@@ -84,6 +90,13 @@ if
is not
.BR GMT .
.PP
+.I Isotime
+converts a broken-down time to a date and timestamp according to ISO-8601 with timezone, and returns a string of up to 24 characters.
+.PP
+.I Isodate
+converts a broken-down time to a datestamp
+without timezone, and returns a 10 byte string.
+.PP
When local time is first requested,
the program consults the
.B timezone