Skip to main content
Version: Java (Groovy)

epochMillisToZonedDateTime

epochMillisToZonedDateTime converts an offset from the Epoch to a ZonedDateTime.

Syntax

epochMillisToZonedDateTime(millis, timeZone)

Parameters

ParameterTypeDescription
millislong

The milliseconds from the Epoch.

timeZoneZoneId

The time zone.

Returns

A ZonedDateTime.

Examples

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