Skip to main content

init

Function init 

Source
pub fn init(explicit: Option<Tz>) -> Result<(), AppError>
Expand description

Initializes the global timezone.

explicit — value from the --tz CLI flag (already parsed). If explicit is None, tries XDG display.tz, then UTC.

Subsequent calls are silently ignored (OnceLock semantics). Returns an error only if explicit is None and the XDG value is invalid.