xtr_clock.bundle ¶
The xtr-dependency-injection bundle for xtr-clock.
ClockBundle ¶
Bases: Bundle[ClockConfig]
Provides a :class:Clock and keeps :meth:Clock.get in sync with it.
Prepare for the boot-time :meth:Clock.install installation.
ClockConfig
dataclass
¶
How the clock bundle builds its :class:~xtr_clock.clock.Clock.
The clock reports in UTC unless told otherwise, so an application reads the same instant the same way on a laptop, in a container and in CI, whatever each machine's own zone is set to.
Attributes:
-
timezone(str | None) –The zone :meth:
~xtr_clock.clock.Clock.nowreports in:"UTC"unless set, any zone name the system knows, orNoneto follow the machine's own zone.