[#BloombergLP-baltzo-DefaultZoneinfoCache-setDefaultCache]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baltzo.adoc[baltzo]::xref:BloombergLP/baltzo/DefaultZoneinfoCache.adoc[DefaultZoneinfoCache]::setDefaultCache
:relfileprefix: ../../../
:mrdocs:

Set the default Zoneinfo cache object&period;

== Synopsis

Declared in `&lt;baltzo&lowbar;defaultzoneinfocache&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/baltzo/ZoneinfoCache.adoc[ZoneinfoCache]*
setDefaultCache(xref:BloombergLP/baltzo/ZoneinfoCache.adoc[ZoneinfoCache]* cache);
----

== Description

Set the address of the default `ZoneinfoCache` object to the specified `cache`&period; Return the address of the default cache object that was set by a previous call to this method, or 0 if no call to this method was previously executed&period; The behavior is undefined unless (1) `cache` remains valid until the last operation is performed on this process&apos;s default cache, or a subsequent call to `setDefaultCache`, and (2) this method is _not_ called from one thread while another thread is attempting to access the default time zone cache instance (i&period;e&period;, this method is _not_ thread&hyphen;safe)&period; Note that this method is intended for use _only_ by the _owner_ of `main` (and for testing purposes) where the caller affirmatively takes responsibility for the behavior of all clients of the default time zone cache&period;

== Return Value

the address of the previously installed default cache, or 0

== Parameters

[cols="1,4"]
|===
| Name| Description
| *cache*
| Zoneinfo cache to install as the default
|===


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