GLib.DateTime.to_utc

### Method

# GLib DateTimeto_utc

since: 2.26

#### Declaration [src]

    GDateTime*
    g_date_time_to_utc (
      GDateTime* datetime
    )

#### Description [src]

Creates a new `GDateTime` corresponding to the same instant in time as `datetime`, but in UTC.

This call is equivalent to calling `g_date_time_to_timezone()` with the time zone returned by g_time_zone_new_utc().

Available since: 2.26

#### Return value

Type: `GDateTime`

The newly created `GDateTime` which should be freed with g_date_time_unref(), or `NULL`.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be `NULL`.