Skip to content
Legacy docs for Tenzir v5.x. For the latest Tenzir v6 series, visit docs.tenzir.com. Migrating from v5? Read the Tenzir v6 migration guide.

Interprets a duration as Unix time.

from_epoch(x:duration) -> time

The from_epoch function interprets a duration as Unix time.

The duration since the Unix epoch, i.e., 00:00:00 UTC on 1 January 1970.

from {time: 1736525429}
time = from_epoch(time * 1s)
{time: 2025-01-10T16:10:29+00:00}
from {x: from_epoch(50y + 12w + 20m)}
{x: 2020-03-13T00:20:00.000000}

Last updated: