MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / dateToTimeStampTz

Method dateToTimeStampTz

src/common/TimeZoneUtil.cpp:1032–1043  ·  view source on GitHub ↗

Converts a date to timestamp-tz.

Source from the content-addressed store, hash-verified

1030
1031// Converts a date to timestamp-tz.
1032ISC_TIMESTAMP_TZ TimeZoneUtil::dateToTimeStampTz(const ISC_DATE& date, Callbacks* cb)
1033{
1034 // SQL: source => TIMESTAMP WITHOUT TIME ZONE => TIMESTAMP WITH TIME ZONE
1035
1036 ISC_TIMESTAMP_TZ tsTz;
1037 tsTz.utc_timestamp.timestamp_date = date;
1038 tsTz.utc_timestamp.timestamp_time = 0;
1039 tsTz.time_zone = cb->getSessionTimeZone();
1040 localTimeStampToUtc(tsTz);
1041
1042 return tsTz;
1043}
1044
1045//-------------------------------------
1046

Callers

nothing calls this directly

Calls 1

getSessionTimeZoneMethod · 0.45

Tested by

no test coverage detected