[#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&period; Return 0 on success, and a non&hyphen;zero value with no effect on this `DateTz` object otherwise&period;

== Synopsis

Declared in `&lt;bdlt&lowbar;datetz&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
validateAndSetDateTz(
    xref:BloombergLP/bdlt/Date.adoc[Date] const& localDate,
    int offset);
----

== Description

DEPRECATED&colon; Use `setDateTzIfValid` instead&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
