Skip to main content
Version: Java (Groovy)

epochAutoToEpochNanos

epochAutoToEpochNanos converts an offset from the Epoch to a nanoseconds value.

Syntax

epochAutoToEpochNanos(epochOffset)

Parameters

ParameterTypeDescription
epochOffsetlong

The time offset from the Epoch. Can be in milliseconds, microseconds, or nanoseconds. Expected date ranges are used to infer the units for the offset.

Returns

The nanoseconds since the Epoch.

Examples

nanos = epochAutoToEpochNanos(1672594496)
println nanos
nanos = epochAutoToEpochNanos(1672594496000)
println nanos
nanos = epochAutoToEpochNanos(1672594496000000)
println nanos