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

Method localTimeStampToUtc

src/common/TimeZoneUtil.cpp:676–687  ·  view source on GitHub ↗

Converts a timestamp from its local datetime fields to UTC.

Source from the content-addressed store, hash-verified

674
675// Converts a timestamp from its local datetime fields to UTC.
676void TimeZoneUtil::localTimeStampToUtc(ISC_TIMESTAMP& timeStamp, Callbacks* cb)
677{
678 ISC_TIMESTAMP_TZ tsTz;
679 tsTz.utc_timestamp.timestamp_date = timeStamp.timestamp_date;
680 tsTz.utc_timestamp.timestamp_time = timeStamp.timestamp_time;
681 tsTz.time_zone = cb->getSessionTimeZone();
682
683 localTimeStampToUtc(tsTz);
684
685 timeStamp.timestamp_date = tsTz.utc_timestamp.timestamp_date;
686 timeStamp.timestamp_time = tsTz.utc_timestamp.timestamp_time;
687}
688
689// Converts a timestamp from its local datetime fields to UTC.
690void TimeZoneUtil::localTimeStampToUtc(ISC_TIMESTAMP_TZ& timeStampTz)

Callers

nothing calls this directly

Calls 8

isOffsetFunction · 0.85
offsetZoneToDisplacementFunction · 0.85
decode_timestampFunction · 0.85
getDescFunction · 0.85
raiseFunction · 0.85
GdsClass · 0.85
getCalendarMethod · 0.80
getSessionTimeZoneMethod · 0.45

Tested by

no test coverage detected