Return whether localTime and offset form a valid TimeTz.

Synopsis

Declared in <bdlt_timetz.h>

static
bool
isValid(
    Time const& localTime,
    int offset);

Description

Return true if the specified localTime and the specified time zone offset represent a valid TimeTz value, and false otherwise. A localTime and offset represent a valid TimeTz value if offset is in the range ( ‐1440 .. 1440 ), and offset is 0 if localTime has the value 24:00:00.000. Note that a true result from this function does not guarantee that offset corresponds to any geographical or historical time zone. Also note that a true result from this function does not guarantee that localTime itself is a valid Time object.

Return Value

true if valid, and false otherwise

Parameters

Name

Description

localTime

local time to validate

offset

time zone offset from UTC in minutes

Created with MrDocs