Documentation
¶
Overview ¶
Package managedtime holds the one rule every writer path applies to a managed lifecycle timestamp: the text a write stores is the UTC spelling of the instant, so the stored value of an instant never depends on the host's time zone.
A managed `created_at` / `updated_at` is consumed as text. A consumer writes a DynamoDB condition over the stored attribute, or reads the attribute back and writes it again, and either one compares spellings: RFC3339Nano renders the same instant as "2026-01-02T03:04:05Z" on a UTC host and as "2026-01-02T05:04:05+02:00" on a host set to Europe/Berlin. Normalizing where the clock is read keeps every writer path — put, batch put, transactional put, update and preflight — on the one spelling, and it is what makes a boundary written by a Lambda function (always UTC) comparable with one written by a developer's machine (not always UTC).
A value the caller supplies is not normalized: the contract stores a creation time the model carries verbatim, and re-spelling it would change what the caller wrote.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Now ¶
Now returns the instant a managed write stamps, expressed in UTC.
A nil clock is the wall clock. A configured clock (session.Config.Now, for example) supplies the instant and is honored, but never for its zone: the value is normalized so a caller-injected clock cannot make the stored text depend on anything but the instant it names.
Types ¶
This section is empty.