Skip to main content

Module format

Module format 

Source
Expand description

Strftime rendering with moreutils-ts fractional-second extensions.

Per spec.md FR-003, FR-004, FR-008 and plan.md HINT-001:

moreutils ts adds two strftime tokens chrono does not implement natively: %.S (seconds-with-fractional-component) and %.s (Unix epoch-with-fractional-component). We implement these as a one-pass pre-tokenizer that splices the fractional digits into the chrono-rendered output. Default precision is 6 digits (microsecond, matching moreutils’ Time::HiRes-backed default) per FR-008.

The default format string is "%b %d %H:%M:%S" (FR-003).

Constants§

DEFAULT_FORMAT
The moreutils ts default format.
DEFAULT_FRACTIONAL_DIGITS
Default fractional precision (digits) for %.S / %.s. Microsecond resolution per FR-008.

Functions§

format_default
Render the moreutils default format via the supplied timezone.
format_with
Render an arbitrary strftime format, expanding moreutils %.S and %.s fractional tokens before delegating the rest to chrono.