[#BloombergLP-bdlt-TimeTz-validateAndSetTimeTz] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/TimeTz.adoc[TimeTz]::validateAndSetTimeTz :relfileprefix: ../../../ :mrdocs: 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. Return 0 on success, and a non‐zero value with no effect on this object otherwise. == Synopsis Declared in `<bdlt_timetz.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int validateAndSetTimeTz( xref:BloombergLP/bdlt/Time.adoc[Time] const& localTime, int offset); ---- == Description DEPRECATED: replaced by `setTimeTzIfValid`. [.small]#Created with https://www.mrdocs.com[MrDocs]#