Documentation

Std.Time.Zoned.ZoneRules

Represents the type of local time in relation to UTC.

  • ut : UTLocal

    Universal Time (UT), often referred to as UTC.

  • local : UTLocal

    Local time that is not necessarily UTC.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Represents types of wall clocks or standard times.

      • wall : StdWall

        Time based on a wall clock, which can include daylight saving adjustments.

      • standard : StdWall

        Standard time without adjustments for daylight saving.

      Instances For
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Represents a type of local time, including offset and daylight saving information.

          • gmtOffset : Offset

            The offset from GMT for this local time.

          • isDst : Bool

            Indicates if daylight saving time is observed.

          • abbreviation : String

            The abbreviation for this local time type (e.g., "EST", "PDT").

          • wall : StdWall

            Indicates if the time is wall clock or standard time.

          • utLocal : UTLocal

            Distinguishes between universal time and local time.

          • identifier : String

            ID of the timezone

          Instances For
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Gets the TimeZone offset from a LocalTimeType.

              Equations
              Instances For

                Represents a time zone transition, mapping a time to a local time type.

                • The specific time of the transition event.

                • localTimeType : LocalTimeType

                  The local time type associated with this transition.

                Instances For
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For

                    Represents the rules for a time zone.

                    • initialLocalTimeType : LocalTimeType

                      The first LocalTimeType used as a fallback when no matching transition is found.

                    • transitions : Array Transition

                      The array of transitions for the time zone.

                    • transitionRule : Option RecurringRule

                      Recurring rule from the TZif footer, used to extrapolate transitions beyond the last stored entry.

                    Instances For
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For

                        Returns the transition time as a Timestamp.

                        Equations
                        Instances For

                          Create a TimeZone from a Transition.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For

                            Finds the index of the transition in effect at a given timestamp in Array Transition. Returns the index of the most recent transition that started at or before the timestamp, or none if the timestamp precedes all transitions.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For

                              Finds the transition in effect at a given timestamp in Array Transition. Returns the most recent transition that started at or before the timestamp, or none if the timestamp precedes all transitions.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For

                                Find the current TimeZone out of a Transition in a Array Transition

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For

                                  Returns the TimeZone in effect for this RecurringRule at the given Timestamp.

                                  If no DST rule is defined, or if either transition rule is missing, the standard zone is returned unconditionally. Otherwise the function computes the UTC timestamps at which DST starts and ends for the year containing tm, and returns the DST zone when the timestamp falls inside the DST interval (accounting for rules that wrap across a year boundary in the Southern Hemisphere).

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For

                                    Creates ZoneRules with a fixed GMT offset.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      @[inline]

                                      Creates ZoneRules with a fixed offset of UTC (GMT+0).

                                      Equations
                                      Instances For

                                        Finds the LocalTimeType corresponding to a given Timestamp in ZoneRules. If the timestamp falls between two transitions, it returns the most recent transition before the timestamp. When the timestamp is beyond all stored transitions and a POSIX TZ footer rule is present, the rule is consulted. Falls back to initialLocalTimeType if no transition or rule applies.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For

                                          Finds the LocalTimeType for a given wall-clock time (seconds since 1970-01-01T00:00:00 in local time). Unlike findLocalTimeTypeForTimestamp, this compares each transition's UTC time adjusted by the previous offset — necessary when converting local time to UTC.

                                          When the wall time falls beyond all stored transitions and a transitionRule is present, the recurring rule is used to determine the timezone (converting the wall time to UTC via the last known offset before consulting the rule).

                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For

                                            Find the current TimeZone out of a Transition in a ZoneRules

                                            Equations
                                            Instances For
                                              @[inline]

                                              Creates ZoneRules for the given TimeZone.

                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For