From cdb7bdde96c0147fffe6d568ac7837839f678d8c Mon Sep 17 00:00:00 2001 From: google Date: Sun, 2 Sep 2012 23:05:41 +1200 Subject: Add isotime() and isodate() functions to libc. --- sys/man/2/ctime | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'sys/man/2') 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 .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 -- cgit v1.2.3