Time.epoch()

Get the time given the epoch time.

Signature

Time.epoch(offset: Number, units: String) => Time

Description

Get the time given the offset from epoch time and the epoch time units.

Parameters

Parameter Type Required Description

offset

Number

Yes

Offset from epoch time.

units

String

Yes

offset time units:

nanoseconds
microseconds
milliseconds
seconds
minutes
hours
days

Return value

Type Description

Time

Epoch time offset rounded to the nearest nanosecond.

Examples

Time.epoch(1676030400, 'seconds')
Time("2023-02-10T12:00:00Z")

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!