+
+ return tm_to_ISO8601_date(<);
+}
+
+char *tm_to_ISO8601_date(struct tm *tm)
+{
+ char *str;
+
+ str = malloc(ISO8601_DATE_LENGTH + 1);
+
+ if (strftime(str, ISO8601_DATE_LENGTH + 1, "%F", tm))
+ return str;
+
+ free(str);
+ return NULL;
+}
+
+char *tm_to_ISO8601_time(struct tm *tm)
+{
+ char *str;
+
+ str = malloc(ISO8601_TIME_LENGTH + 1);
+
+ if (strftime(str, ISO8601_TIME_LENGTH + 1, "%FT%T", tm))
+ return str;
+
+ free(str);
+ return NULL;