Skip to main content
Version: Java (Groovy)

parseTimeZone

The parseTimeZone method parses the supplied string as a time zone.

Syntax

parseTimeZone(s)

Parameters

ParameterTypeDescription
sstring

The string to be converted.

Returns

A ZoneId.

Examples

tz = parseTimeZone("America/Los_Angeles")

println epochMillisToZonedDateTime(100, tz)