Tempo.GroundedTempoError exception (Tempo v1.0.0)

Copy Markdown View Source

Exception raised when an operation requires a floating Tempo value but the supplied value is grounded — it already carries an [IANA/Zone] tag, a Z, or a numeric offset.

Tempo.in_zone/2 places a floating value into a zone; a value that is already grounded should be moved with Tempo.shift_zone/2 instead, which re-computes the wall clock to preserve the instant.

Summary

Types

t()

@type t() :: %Tempo.GroundedTempoError{
  __exception__: term(),
  operation: atom() | String.t() | nil,
  value: Tempo.t() | nil
}