TimeZoneChange
final class TimeZoneChange : Model, @unchecked Sendable
A TimeZoneChange
model says that at a specific UTC Date the ship will adopt a given timezone, specified by abbreviation and UTC offset.
The ‘current’ TimeZoneChange is the one with the a start date in the most recent past. The timezone indicated by the current TimeZoneChange is in force until the next (in Date order) TimeZoneChange becomes current.
-
Declaration
Swift
static let schema: String
-
The TimeZoneChange’s ID, provisioned automatically.
Declaration
Swift
@TimeZoneChange .ID var id: UUID? { get set }
-
The time, in absolute tems, when this Time Zone comes into effect. The TZ stays in effect until superceded by another TimeZoneChange; the last one is in effect forever, as far as we’re concerned.
Declaration
Swift
@TimeZoneChange .Field var startTime: Date { get set }
-
Abbreviation of the timezone, such as EST.
Declaration
Swift
@TimeZoneChange .Field var timeZoneName: String { get set }
-
Foundation has a bunch of TimeZone Identifier strings for timezones, and they specify a timezone with more granularity than an EST-style abbreviation. For example,
America/Halifax
andAmerica/Puerto_Rico
are both in the AST timezone, but Halifax observes DST and Puerto Rico doesn’t.Declaration
Swift
@TimeZoneChange .Field var timeZoneID: String { get set }
-
Declaration
Swift
init()
-
Initializes a new TimeZoneChange.
Declaration
Swift
init(startTime: Date, name: String, id: String) throws
Parameters
startTime
When the timezone goes into effect
offset
GMT offset in hours.
name
The abbreviated name for the timezone, e.g. “EST”.
id
The Apple identifier for the timezone, e.g. “America/New_York”.