GLib.DateTime.to_unix

### Method

# GLib DateTimeto_unix

since: 2.26

#### Declaration [src]

    gint64
    g_date_time_to_unix (
      GDateTime* datetime
    )

#### Description [src]

Gives the Unix time corresponding to `datetime`, rounding down to the nearest second.

Unix time is the number of seconds that have elapsed since 1970-01-01 00:00:00 UTC, regardless of the time zone associated with `datetime`.

Available since: 2.26

#### Return value

Type: `gint64`

The Unix time corresponding to `datetime`.