GLib.Date.set_time_t

### Method

# GLib Dateset_time_t

since: 2.10

#### Declaration

    void
    g_date_set_time_t (
      GDate* date,
      time_t timet
    )

#### Description

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:

     time_t now = time (NULL);
     if (now == (time_t) -1)
       // handle the error
     g_date_set_time_t (date, now);

Available since: 2.10

#### Parameters

`timet`

  Type: `time_t`

  Time_t value to set.