Document exactly what g_time_val_to_iso8601() produces
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Tue, 18 Oct 2011 10:14:20 +0000 (11:14 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 18 Nov 2011 04:11:01 +0000 (23:11 -0500)
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=537637
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
glib/gtimer.c

index f9f8570..6e962b4 100644 (file)
@@ -475,8 +475,26 @@ g_time_val_from_iso8601 (const gchar *iso_date,
  * g_time_val_to_iso8601:
  * @time_: a #GTimeVal
  * 
- * Converts @time_ into an ISO 8601 encoded string, relative to the
- * Coordinated Universal Time (UTC).
+ * Converts @time_ into an RFC 3339 encoded string, relative to the
+ * Coordinated Universal Time (UTC). This is one of the many formats
+ * allowed by ISO 8601.
+ *
+ * ISO 8601 allows a large number of date/time formats, with or without
+ * punctuation and optional elements. The format returned by this function
+ * is a complete date and time, with optional punctuation included, the
+ * UTC time zone represented as "Z", and the @tv_usec part included if
+ * and only if it is nonzero, i.e. either
+ * "YYYY-MM-DDTHH:MM:SSZ" or "YYYY-MM-DDTHH:MM:SS.fffffZ".
+ *
+ * This corresponds to the Internet date/time format defined by
+ * <ulink url="https://www.ietf.org/rfc/rfc3339.txt">RFC 3339</ulink>, and
+ * to either of the two most-precise formats defined by
+ * <ulink url="http://www.w3.org/TR/NOTE-datetime-19980827">the W3C Note
+ * "Date and Time Formats"</ulink>. Both of these documents are profiles of
+ * ISO 8601.
+ *
+ * Use g_date_time_format() or g_strdup_printf() if a different
+ * variation of ISO 8601 format is required.
  *
  * Return value: a newly allocated string containing an ISO 8601 date
  *