GLib.DateTime.compare

### Method

# GLib DateTimecompare

since: 2.26

#### Declaration [src]

    gint
    g_date_time_compare (
      gconstpointer dt1,
      gconstpointer dt2
    )

#### Description [src]

A comparison function for date-times that is suitable as a `GCompareFunc`.

This effectively converts both date-times to the same time zone before comparing, so date-times in different time zones can compare equal if they refer to the same instant. See `g_date_time_difference()`.

Both date-times must be non-`NULL`.

Available since: 2.26

#### Parameters

`dt2`

  Type: `GDateTime`

  Second date-time to compare.

#### Return value

Type: `gint`

`-1`, `0` or `1` if `dt1` is less than, equal to or greater than `dt2`.