GLib.DateTime.new_from_timeval_local
Description: Reference for GLib.DateTime.new_from_timeval_local

### Function

# GLib DateTimenew_from_timeval_local

deprecated: 2.62 since: 2.26

#### Declaration

    GDateTime*
    g_date_time_new_from_timeval_local (
      const GTimeVal* tv
    )

#### Description

Creates a `GDateTime` corresponding to the given `GTimeVal` `tv` in the local time zone.

The time contained in a `GTimeVal` is always stored in the form of seconds elapsed since 1970-01-01 00:00:00 UTC, regardless of the local time offset.

This call can fail (returning `NULL`) if `tv` represents a time outside of the supported range of `GDateTime`.

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

Available since: 2.26

Deprecated since: 2.62

`GTimeVal` is not year-2038-safe. Use `g_date_time_new_from_unix_local()` instead.

#### Parameters

`tv`

  Type: `GTimeVal`

  A `GTimeVal`.

  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`.