function to_timezone(tz: GLib.TimeZone): GLib.DateTime {
    // Gjs wrapper for g_date_time_to_timezone()

Create a new GLib.DateTime corresponding to the same instant in time as datetime, but in the time zone tz.

This call can fail in the case that the time goes out of bounds. For example, converting 0001-01-01 00:00:00 UTC to a time zone west of Greenwich will fail (due to the year 0 being out of range).

You should release the return value by calling GLib.DateTime.prototype.unref when you are done with it.

Since 2.26


the new GLib.TimeZone


a new GLib.DateTime, or null