[#BloombergLP-bdlt-DateTz-validateAndSetDateTz] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/DateTz.adoc[DateTz]::validateAndSetDateTz :relfileprefix: ../../../ :mrdocs: 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. == Synopsis Declared in `<bdlt_datetz.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int validateAndSetDateTz( xref:BloombergLP/bdlt/Date.adoc[Date] const& localDate, int offset); ---- == Description DEPRECATED: Use `setDateTzIfValid` instead. [.small]#Created with https://www.mrdocs.com[MrDocs]#