GLib.Date.prototype.set_time_t

function set_time_t(timet: Number(glong)): void {
    // Gjs wrapper for g_date_set_time_t()
}
  

Sets the value of a date to the date corresponding to a time specified as a time_t. The time to date conversion is done using the user's current timezone.

To set the value of a date to the current day, you could write: |[<!-- language="C" --> g_date_set_time_t (date, time (NULL)); ]|

Since 2.10

timet

time_t value to set