GLib.TimeVal.prototype.to_iso8601
function to_iso8601(): String { // Gjs wrapper for g_time_val_to_iso8601() }
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 [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt), and to either of the two most-precise formats defined by the W3C Note [Date and Time Formats](http://www.w3.org/TR/NOTE-datetime-19980827). Both of these documents are profiles of ISO 8601.
Use GLib.DateTime.prototype.format or GLib.strdup_printf if a different variation of ISO 8601 format is required.
Since 2.12
- Returns
a newly allocated string containing an ISO 8601 date