time_spec: Compile and validate canonical time settings

View source: R/time.R

time_specR Documentation

Compile and validate canonical time settings

Description

Compiles and validates time settings from explicit unit, origin, and zone parameters. v2.0 only supports explicit time_spec() calls; ctx fallback was removed.

Usage

time_spec(unit = NULL, origin = NULL, zone = "UTC")

Arguments

unit

Required time unit. One of "seconds", "minutes", "hours", "days", "weeks", "months", "years".

origin

Optional Date or POSIXct/POSIXt origin used for calendar-time conversion. Defaults to Unix epoch.

zone

Time zone used for calendar-time conversion (default "UTC").

Value

An object of class time_spec with precomputed conversion constants.


fluxCore documentation built on Sept. 22, 2026, 5:07 p.m.