GLib.DateTime.new_from_unix_utc

function new_from_unix_utc(t: Number(gint64)): GLib.DateTime {
    // Gjs wrapper for g_date_time_new_from_unix_utc()
}
  

Creates a GLib.DateTime corresponding to the given Unix time t in UTC.

Unix time is the number of seconds that have elapsed since 1970-01-01 00:00:00 UTC.

This call can fail (returning null) if t represents a time outside of the supported range of GLib.DateTime.

You should release the return value by calling GLib.DateTime.prototype.unref when you are done with it.

Since 2.26

t

the Unix time

Returns

a new GLib.DateTime, or null