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
    @[implicit_reducible]

    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
      @[implicit_reducible]

      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

        Gets the TimeZone offset from a LocalTimeType.

        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

            Represents the rules for a time zone.

            Instances For

              Returns the transition time as a Timestamp.

              Instances For

                Create a TimeZone from a Transition.

                Instances For

                  Applies the transition to a Timestamp.

                  Instances For

                    Finds the transition corresponding to a given timestamp in Array Transition. If the timestamp falls between two transitions, it returns the most recent transition before the timestamp.

                    Instances For

                      Finds the transition corresponding to a given timestamp in Array Transition. If the timestamp falls between two transitions, it returns the most recent transition before the timestamp.

                      Instances For

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

                        Instances For

                          Creates ZoneRules with a fixed GMT offset.

                          Instances For
                            @[inline]

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

                            Instances For
                              @[inline]

                              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. If no transition is found, it falls back to initialLocalTimeType.

                              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.

                                Instances For
                                  @[inline]

                                  Find the current TimeZone out of a Transition in a ZoneRules

                                  Instances For
                                    @[inline]

                                    Creates ZoneRules for the given TimeZone.

                                    Instances For