Skip to content

Initializer

init(secondsFromGMT:)

iOS 8.0+ iPadOS 8.0+ Mac Catalyst 8.0+ macOS 10.10+ tvOS 9.0+ watchOS 2.0+
Returns a time zone initialized with a specific number of seconds from GMT.
init?(secondsFromGMT seconds: Int)

Parameters

seconds

The number of seconds from GMT.

Return Value

A time zone, or nil if a valid time zone could not be created from seconds.

Discussion

Time zones created with this never have daylight savings and the offset is constant no matter the date. The identifier and abbreviation do NOT follow the POSIX convention (of minutes-west).