Skip to main content
Version: Java (Groovy)

parseLocalTime

parseLocalTime parses the string argument as a local time, which is the time that would be read from a clock and does not have a date or timezone.

Syntax

parseLocalTime(s)

Parameters

ParameterTypeDescription
sstring

The string to be converted. Format is hh:mm:ss[.nnnnnnnnn].

Returns

A local time. Throws an exception if the time cannot be parsed.

Examples

time = parseLocalTimeQuiet("11:29:23.123123")
println time