function find_interval(type: GLib.TimeType, time_: Number(gint64)): Number(gint) {
    // Gjs wrapper for g_time_zone_find_interval()

Finds an the interval within tz that corresponds to the given time_. The meaning of time_ depends on type.

If type is GLib.TimeType.universal then this function will always succeed (since universal time is monotonic and continuous).

Otherwise time_ is treated is local time. The distinction between GLib.TimeType.standard and GLib.TimeType.daylight is ignored except in the case that the given time_ is ambiguous. In Toronto, for example, 01:30 on November 7th 2010 occurred twice (once inside of daylight savings time and the next, an hour later, outside of daylight savings time). In this case, the different value of type would result in a different interval being returned.

It is still possible for this function to fail. In Toronto, for example, 02:00 on March 14th 2010 does not exist (due to the leap forward to begin daylight savings time). -1 is returned in that case.

Since 2.26


the GLib.TimeType of time_


a number of seconds since January 1, 1970


the interval containing time_, or -1 in case of failure