BloombergLP::bdlt::DatetimeTz::DatetimeTz

Create a DatetimeTz from a local datetime and UTC offset.

Synopsis

Declared in <bdlt_datetimetz.h>

DatetimeTz(
    Datetime const& localDatetime,
    int offset);

Description

Create a DatetimeTz object having a local datetime value equal to the specified localDatetime and a time zone offset value from UTC equal to the specified offset (in minutes). The behavior is undefined unless all of the specified values are within their valid ranges (see isValid). Note that this method provides no validation, and it is the user's responsibility to ensure that offset represents a valid time zone and that localDatetime represents a valid datetime in that time zone.

Parameters

NameDescription
localDatetimelocal datetime value
offsettime zone offset from UTC in minutes