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

Method timeToTimeTz

src/common/TimeZoneUtil.cpp:935–949  ·  view source on GitHub ↗

Converts a time to time-tz.

Source from the content-addressed store, hash-verified

933
934// Converts a time to time-tz.
935ISC_TIME_TZ TimeZoneUtil::timeToTimeTz(const ISC_TIME& time, Callbacks* cb)
936{
937 ISC_TIMESTAMP_TZ tsTz;
938 tsTz.time_zone = cb->getSessionTimeZone();
939 tsTz.utc_timestamp.timestamp_date = TIME_TZ_BASE_DATE;
940 tsTz.utc_timestamp.timestamp_time = time;
941
942 localTimeStampToUtc(tsTz);
943
944 ISC_TIME_TZ timeTz;
945 timeTz.time_zone = tsTz.time_zone;
946 timeTz.utc_time = tsTz.utc_timestamp.timestamp_time;
947
948 return timeTz;
949}
950
951// Converts a time-tz to timestamp-tz.
952ISC_TIMESTAMP_TZ TimeZoneUtil::timeTzToTimeStampTz(const ISC_TIME_TZ& timeTz, Callbacks* cb)

Callers

nothing calls this directly

Calls 1

getSessionTimeZoneMethod · 0.45

Tested by

no test coverage detected