[#BloombergLP-baltzo-LocalDatetime-2constructor-06d] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baltzo.adoc[baltzo]::xref:BloombergLP/baltzo/LocalDatetime.adoc[LocalDatetime]::LocalDatetime :relfileprefix: ../../../ :mrdocs: Constructors == Synopses Declared in `<baltzo_localdatetime.h>` Create a `LocalDatetime` object having the (default) attribute values: ` datetimeTz() == bdlt::DatetimeTz() timeZoneId() == "" ` Optionally specify an `allocator` (e.g., the address of a `bslma::Allocator` object) to supply memory; otherwise, the default allocator is used. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/baltzo/LocalDatetime/2constructor-0e.adoc[LocalDatetime](); ---- [.small]#xref:BloombergLP/baltzo/LocalDatetime/2constructor-0e.adoc[_» more..._]# Create a `LocalDatetime` object having the same value and the same allocator as the specified `original` object. The value of `original` becomes unspecified but valid, and its allocator remains unchanged. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/baltzo/LocalDatetime/2constructor-02.adoc[LocalDatetime](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<LocalDatetime>] original) noexcept; ---- [.small]#xref:BloombergLP/baltzo/LocalDatetime/2constructor-02.adoc[_» more..._]# Create a `LocalDatetime` object having default attribute values, using the specified `allocator` to supply memory. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:BloombergLP/baltzo/LocalDatetime/2constructor-01.adoc[LocalDatetime](xref:BloombergLP/baltzo/LocalDatetime/allocator_type.adoc[allocator_type] const& allocator); ---- [.small]#xref:BloombergLP/baltzo/LocalDatetime/2constructor-01.adoc[_» more..._]# Create a `LocalDatetime` object having the same value as the specified `original` object, using the specified `allocator` (e.g., the address of a `bslma::Allocator` object) to supply memory. The allocator of `original` remains unchanged. If `original` and the newly created object have the same allocator then the value of `original` becomes unspecified but valid, and no exceptions will be thrown; otherwise `original` is unchanged and an exception may be thrown. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/baltzo/LocalDatetime/2constructor-0a.adoc[LocalDatetime]( xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<LocalDatetime>] original, xref:BloombergLP/baltzo/LocalDatetime/allocator_type.adoc[allocator_type] const& allocator); ---- [.small]#xref:BloombergLP/baltzo/LocalDatetime/2constructor-0a.adoc[_» more..._]# Create a `LocalDatetime` object having the same value as the specified `original` object. Optionally specify an `allocator` (e.g., the address of a `bslma::Allocator` object) to supply memory; otherwise, the default allocator is used. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/baltzo/LocalDatetime/2constructor-03.adoc[LocalDatetime]( xref:BloombergLP/baltzo/LocalDatetime.adoc[LocalDatetime] const& original, xref:BloombergLP/baltzo/LocalDatetime/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/baltzo/LocalDatetime/2constructor-03.adoc[_» more..._]# Create a `LocalDatetime` object with attribute values set from the specified `datetimeTz` and `timeZoneId`. Optionally specify an `allocator` (e.g., the address of a `bslma::Allocator` object) to supply memory; otherwise, the default allocator is used. If `timeZoneId` is passed as a null pointer, it is treated as an empty string. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/baltzo/LocalDatetime/2constructor-062.adoc[LocalDatetime]( xref:BloombergLP/bdlt/DatetimeTz.adoc[bdlt::DatetimeTz] const& datetimeTz, std::string_view const& timeZoneId, xref:BloombergLP/baltzo/LocalDatetime/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/baltzo/LocalDatetime/2constructor-062.adoc[_» more..._]# Create a `LocalDatetime` object with attribute values set from the specified `datetimeTz` and `timeZoneId`, using the specified `allocator` to supply memory. If `timeZoneId` is passed as a null pointer, it is treated as an empty string. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/baltzo/LocalDatetime/2constructor-08.adoc[LocalDatetime]( xref:BloombergLP/bdlt/DatetimeTz.adoc[bdlt::DatetimeTz] const& datetimeTz, char const* timeZoneId, xref:BloombergLP/baltzo/LocalDatetime/allocator_type.adoc[allocator_type] const& allocator = allocator_type()); ---- [.small]#xref:BloombergLP/baltzo/LocalDatetime/2constructor-08.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *datetimeTz* | the datetime and UTC offset | *timeZoneId* | the time zone identifier | *allocator* | the allocator used to supply memory |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#