Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: TimeZone

[30:7] extends: object

A GTimeZone represents a time zone, at no particular point in time. The GTimeZone struct is refcounted and immutable. Each time zone has an identifier (for example, ‘Europe/London’) which is platform dependent. See [ctor@GLib.TimeZone.new] for information on the identifier formats. The identifier of a time zone can be retrieved using [method@GLib.TimeZone.get_identifier]. A time zone contains a number of intervals. Each interval has an abbreviation to describe it (for example, ‘PDT’), an offset to UTC and a flag indicating if the daylight savings time is in effect during that interval. A time zone always has at least one interval — interval 0. Note that interval abbreviations are not the same as time zone identifiers (apart from ‘UTC’), and cannot be passed to [ctor@GLib.TimeZone.new]. Every UTC time is contained within exactly one interval, but a given local time may be contained within zero, one or two intervals (due to incontinuities associated with daylight savings time). An interval may refer to a specific period of time (eg: the duration of daylight savings time during 2010) or it may refer to many periods of time that share the same properties (eg: all periods of daylight savings time). It is also possible (usually for political reasons) that some properties (like the abbreviation) change between intervals without other properties changing.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • TimeZone (Handle = null)

    Creates a new TimeZone by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.