Function

GLibTimeZonenew_local

Declaration

GTimeZone*
g_time_zone_new_local (
  void
)

Description

Creates a GTimeZone corresponding to local time. The local time zone may change between invocations to this function; for example, if the system administrator changes it.

This is equivalent to calling g_time_zone_new() with the value of the TZ environment variable (including the possibility of NULL).

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

Available since:2.26

Return value

Returns: GTimeZone
 

The local timezone.

 The caller of the function takes ownership of the data, and is responsible for freeing it.