TimeZone.newOffset

Creates a #GTimeZone corresponding to the given constant offset from UTC, in seconds.

This is equivalent to calling glib.time_zone.TimeZone.new_ with a string in the form [+|-]hh[:mm[:ss]].

It is possible for this function to fail if seconds is too big (greater than 24 hours), in which case this function will return the UTC timezone for backwards compatibility. To detect failures like this, use glib.time_zone.TimeZone.newIdentifier directly.

class TimeZone
static
newOffset
()

Parameters

seconds int

offset to UTC, in seconds

Return Value

Type: glib.time_zone.TimeZone

a timezone at the given offset from UTC, or UTC on failure