BloombergLP::bdlt::TimeTz::setTimeTzIfValid

Set this object's time and offset if they form a valid TimeTz.

Synopsis

Declared in <bdlt_timetz.h>

int
setTimeTzIfValid(
    Time const& localTime,
    int offset);

Description

Set the local time and the time zone offset of this object to the specified localTime and offset values respectively if localTime and offset represent a valid TimeTz value, and leave the object unmodified otherwise. Return 0 on success, and a non-zero value otherwise.

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
localTimelocal time value to set
offsettime zone offset from UTC in minutes