Represents a timezone offset as a total number of seconds from UTC.
- ofSeconds :: (
- second : Second.Offset
The same timezone offset in seconds.
- )
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- Std.Time.TimeZone.instOrdOffset = { compare := compareOn fun (x : Std.Time.TimeZone.Offset) => x.second }
Converts an Offset to a string in ISO 8601 format. The colon parameter determines if the hour
and minute components are separated by a colon (e.g., "+01:00" or "+0100").
Equations
- One or more equations did not get rendered due to their size.
Instances For
A zero Offset representing UTC (no offset).
Equations
- Std.Time.TimeZone.Offset.zero = { second := 0 }
Instances For
Creates an Offset from a given number of hours and minutes.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Std.Time.instReprTimeZone = { reprPrec := Std.Time.instReprTimeZone.repr }
Equations
- One or more equations did not get rendered due to their size.
Instances For
A zeroed Timezone representing UTC (no offset).
Equations
- Std.Time.TimeZone.UTC = { offset := Std.Time.TimeZone.Offset.zero, name := "UTC", abbreviation := "UTC", isDST := false }
Instances For
A zeroed Timezone representing GMT (no offset).
Equations
- Std.Time.TimeZone.GMT = { offset := Std.Time.TimeZone.Offset.zero, name := "Greenwich Mean Time", abbreviation := "GMT", isDST := false }
Instances For
Creates a Timestamp from a given number of hour.
Equations
- Std.Time.TimeZone.ofHours name abbreviation n isDST = { offset := Std.Time.TimeZone.Offset.ofHours n, name := name, abbreviation := abbreviation, isDST := isDST }
Instances For
Creates a Timestamp from a given number of second.
Equations
Instances For
Gets the number of seconds in a timezone offset.
Instances For
Converts a Timestamp to a WallTime for a given timezone offset. The result is the local
civil time: wall = UTC + offset.
Equations
- ts.toWallTime offset = Std.Time.WallTime.ofDuration (ts.val + Std.Time.Duration.ofSeconds offset.second)
Instances For
Creates a Timestamp from a WallTime and a timezone offset. Assumes the WallTime represents
civil time at the given offset: UTC = wall − offset.
Equations
- Std.Time.Timestamp.ofWallTime wt offset = Std.Time.Timestamp.ofDurationSinceUnixEpoch (wt.val - Std.Time.Duration.ofSeconds offset.second)
Instances For
Converts a WallTime to a Timestamp given a timezone offset. The WallTime is treated as
civil time at the given offset: UTC = wall − offset.
Equations
- wt.toTimestamp offset = Std.Time.Timestamp.ofWallTime wt offset
Instances For
Creates a WallTime from a Timestamp given a timezone offset. The result is the local
civil time: wall = UTC + offset.
Equations
- Std.Time.WallTime.ofTimestamp ts offset = ts.toWallTime offset