smelt.time¶
Tier: Host - Available in every runtime, including headless mode.
Visibility: Public - Stable Lua API intended for user config and plugins.
Wall-clock time parsing and formatting. Host-tier so plugins can render provider timestamps consistently in both TUI and headless contexts.
smelt.time.format¶
Format Unix seconds in the user's local time zone with a strftime-style format string.
smelt.time.format_utc¶
Format Unix seconds in UTC with a strftime-style format string.
smelt.time.now¶
Return the current Unix timestamp in seconds. Backed by the host clock so tests can freeze time by swapping in a virtual clock.
smelt.time.now_ms¶
Return the current Unix timestamp in milliseconds. Backed by the host clock so tests can freeze time by swapping in a virtual clock.
smelt.time.parse_iso8601¶
Parse an ISO-8601 / RFC3339 timestamp and return Unix seconds, not milliseconds, or nil when the input is invalid.