Skip to main content

now

Function now 

Source
pub fn now() -> DateTime<FixedOffset>
Expand description

The current instant as a fixed-offset (UTC) timestamp.

Returns DateTime<FixedOffset> — the canonical type the universal created / updated frontmatter fields and the log entry timestamp hold — so write surfaces seed it without any RFC3339 string round-trip. Resolution is chrono’s native (sub-second); the canonical writers render it to RFC3339 on the way to disk.

If NOW_OVERRIDE_ENV (DBMD_NOW) is set to a parseable RFC3339 timestamp, that fixed instant is returned instead of the wall clock — the deterministic reproducibility hook (see module docs). An unset or unparseable value falls back to the wall clock, so the default path is unchanged.