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/HalifaxandAmerica/Puerto_Ricoare 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) throwsParameters
startTimeWhen the timezone goes into effect
offsetGMT offset in hours.
nameThe abbreviated name for the timezone, e.g. “EST”.
idThe Apple identifier for the timezone, e.g. “America/New_York”.
View on GitHub