public static OffsetTime toTime ( Object value , EvaluationContext ctx ) { if ( value instanceof String ) { OffsetTime time = ctx . getDateParser ( ) . time ( ( String ) value ) ; if ( time != null ) { return time ; } } else if ( value instanceof OffsetTime ) { return ( OffsetTime ) value ; } else if ( value instanceof ZonedDateTime ) { return ( ( ZonedDateTime ) value ) . toOffsetDateTime ( ) . toOffsetTime ( ) ; } throw new EvaluationError ( "Can't convert '" + value + "' to a time" ) ; }
Tries conversion of any value to a time