Skip to main content
Version: Java (Groovy)

epochNanosToZonedDateTime

epochNanosToZonedDateTime converts an offset from the Epoch to a ZonedDateTime.

Syntax

epochNanosToZonedDateTime(nanos, timeZone)

Parameters

ParameterTypeDescription
nanoslong

The nanoseconds from the Epoch.

timeZoneZoneId

The time zone.

Returns

A ZonedDateTime.

Examples

datetime = epochNanosToZonedDateTime(1641013200000, timeZone("ET"))
println datetime