Skip to main content
Version: Java (Groovy)

epochSecondsToZonedDateTime

epochSecondsToZonedDateTime converts an offset from the Epoch to a ZonedDateTime.

Syntax

epochSecondsToZonedDateTime(seconds, timeZone)

Parameters

ParameterTypeDescription
secondslong

The seconds from the Epoch.

timeZoneZoneId

The time zone.

Returns

A ZonedDateTime.

Examples

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