GLib.DateTime.new_now
Description: Reference for GLib.DateTime.new_now

### Function

# GLib DateTimenew_now

since: 2.26

#### Declaration [src]

    GDateTime*
    g_date_time_new_now (
      GTimeZone* tz
    )

#### Description [src]

Creates a `GDateTime` corresponding to this exact instant in the given time zone `tz`. The time is as accurate as the system allows, to a maximum accuracy of 1 microsecond.

This function will always succeed unless GLib is still being used after the year 9999.

You should release the return value by calling `g_date_time_unref()` when you are done with it.

Available since: 2.26

#### Parameters

`tz`

  Type: `GTimeZone`

  A `GTimeZone`.

  The data is owned by the caller of the function.

#### Return value

Type: `GDateTime`

A new `GDateTime`, or `NULL`.

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