BloombergLP::bdlt::DateTz::validateAndSetDateTz

Set this object's date and offset if they form a valid DateTz.

Synopsis

Declared in <bdlt_datetz.h>

int
validateAndSetDateTz(
    Date const& localDate,
    int offset);

Description

Set the local date and time zone offset of this object to the specified localDate and offset values respectively if localDate and offset represent a valid DateTz value. Return 0 on success, and a non-zero value with no effect on this DateTz object otherwise.

DEPRECATED: Use setDateTzIfValid instead.

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
localDatelocal date value to set
offsettime zone offset from UTC in minutes