Documentation

Std.Time.DateTime.WallTime

A wall-clock time is what a clock shows in a given timezone: the local civil time at some point in time. It is stored as a Duration since 1970-01-01T00:00:00 in local time, equivalent to a PlainDateTime packed into a single offset, which makes arithmetic straightforward.

Every timezone induces a correspondence between Timestamp and WallTime: interpreting a Timestamp in a timezone yields the WallTime (what a clock in that timezone reads at that instant), and resolving a WallTime in a timezone yields the Timestamp (the absolute instant the clock reading refers to).

  • val : Duration

    Duration since 1970-01-01T00:00:00 in local (civil) time.

Instances For
    theorem Std.Time.WallTime.ext {x y : WallTime} (val : x.val = y.val) :
    x = y
    def Std.Time.instDecidableEqWallTime.decEq (x✝ x✝¹ : WallTime) :
    Decidable (x✝ = x✝¹)
    Equations
    Instances For
      @[implicit_reducible]
      Equations
      @[implicit_reducible]
      Equations
      @[implicit_reducible]
      Equations
      @[implicit_reducible]
      Equations
      @[inline]

      Creates a WallTime from a Duration. The epoch is 1970-01-01 00:00:00 in local (civil) time, not UTC.

      Equations
      Instances For
        @[inline]

        Creates a WallTime from a Second.Offset. The epoch is 1970-01-01 00:00:00 in local (civil) time, not UTC.

        Equations
        Instances For
          @[inline]

          Creates a WallTime from a Nanosecond.Offset. The epoch is 1970-01-01 00:00:00 in local (civil) time, not UTC.

          Equations
          Instances For
            @[inline]

            Converts a WallTime to a Second.Offset. The epoch is 1970-01-01 00:00:00 in local (civil) time, not UTC.

            Equations
            Instances For
              @[inline]

              Converts a WallTime to a Nanosecond.Offset. The epoch is 1970-01-01 00:00:00 in local (civil) time, not UTC.

              Equations
              Instances For
                @[inline]

                Converts a WallTime to a Minute.Offset. The epoch is 1970-01-01 00:00:00 in local (civil) time, not UTC.

                Equations
                Instances For
                  @[inline]

                  Converts a WallTime to a Day.Offset. The epoch is 1970-01-01 00:00:00 in local (civil) time, not UTC.

                  Equations
                  Instances For
                    @[inline]

                    Creates a WallTime from a Millisecond.Offset. The epoch is 1970-01-01 00:00:00 in local (civil) time, not UTC.

                    Equations
                    Instances For
                      @[inline]

                      Converts a WallTime to a Millisecond.Offset. The epoch is 1970-01-01 00:00:00 in local (civil) time, not UTC.

                      Equations
                      Instances For
                        @[inline]

                        Adds a Millisecond.Offset to the given WallTime.

                        Equations
                        Instances For
                          @[inline]

                          Subtracts a Millisecond.Offset from the given WallTime.

                          Equations
                          Instances For
                            @[inline]

                            Adds a Nanosecond.Offset to the given WallTime.

                            Equations
                            Instances For
                              @[inline]

                              Subtracts a Nanosecond.Offset from the given WallTime.

                              Equations
                              Instances For
                                @[inline]

                                Adds a Second.Offset to the given WallTime.

                                Equations
                                Instances For
                                  @[inline]

                                  Subtracts a Second.Offset from the given WallTime.

                                  Equations
                                  Instances For
                                    @[inline]

                                    Adds a Minute.Offset to the given WallTime.

                                    Equations
                                    Instances For
                                      @[inline]

                                      Subtracts a Minute.Offset from the given WallTime.

                                      Equations
                                      Instances For
                                        @[inline]

                                        Adds an Hour.Offset to the given WallTime.

                                        Equations
                                        Instances For
                                          @[inline]

                                          Subtracts an Hour.Offset from the given WallTime.

                                          Equations
                                          Instances For
                                            @[inline]

                                            Adds a Day.Offset to the given WallTime.

                                            Equations
                                            Instances For
                                              @[inline]

                                              Subtracts a Day.Offset from the given WallTime.

                                              Equations
                                              Instances For
                                                @[inline]

                                                Subtracts a Week.Offset from the given WallTime.

                                                Equations
                                                Instances For
                                                  @[inline]

                                                  Adds a Duration to the given WallTime.

                                                  Equations
                                                  Instances For
                                                    @[inline]

                                                    Subtracts a Duration from the given WallTime.

                                                    Equations
                                                    Instances For
                                                      @[inline]

                                                      Converts a WallTime to a Duration. The epoch is 1970-01-01 00:00:00 in local (civil) time, not UTC.

                                                      Equations
                                                      Instances For