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

Method timeToTimeStampTz

src/common/TimeZoneUtil.cpp:921–932  ·  view source on GitHub ↗

Converts a time to timestamp-tz.

Source from the content-addressed store, hash-verified

919
920// Converts a time to timestamp-tz.
921ISC_TIMESTAMP_TZ TimeZoneUtil::timeToTimeStampTz(const ISC_TIME& time, Callbacks* cb)
922{
923 // SQL: source => TIMESTAMP WITHOUT TIME ZONE => TIMESTAMP WITH TIME ZONE
924
925 ISC_TIMESTAMP_TZ tsTz;
926 tsTz.utc_timestamp.timestamp_date = cb->getLocalDate();
927 tsTz.utc_timestamp.timestamp_time = time;
928 tsTz.time_zone = cb->getSessionTimeZone();
929 localTimeStampToUtc(tsTz);
930
931 return tsTz;
932}
933
934// Converts a time to time-tz.
935ISC_TIME_TZ TimeZoneUtil::timeToTimeTz(const ISC_TIME& time, Callbacks* cb)

Callers

nothing calls this directly

Calls 2

getLocalDateMethod · 0.45
getSessionTimeZoneMethod · 0.45

Tested by

no test coverage detected