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

Function makeFromOffset

src/common/TimeZoneUtil.cpp:1151–1161  ·  view source on GitHub ↗

Makes a time zone id from offsets.

Source from the content-addressed store, hash-verified

1149
1150// Makes a time zone id from offsets.
1151static USHORT makeFromOffset(int sign, unsigned tzh, unsigned tzm)
1152{
1153 if (!TimeZoneUtil::isValidOffset(sign, tzh, tzm))
1154 {
1155 string str;
1156 str.printf("%s%02u:%02u", (sign == -1 ? "-" : "+"), tzh, tzm);
1157 status_exception::raise(Arg::Gds(isc_invalid_timezone_offset) << str);
1158 }
1159
1160 return (USHORT)displacementToOffsetZone((tzh * 60 + tzm) * sign);
1161}
1162
1163// Gets the displacement from a offset-based time zone id.
1164static inline SSHORT offsetZoneToDisplacement(USHORT timeZone)

Callers 2

getSystemTimeZoneMethod · 0.85
parseMethod · 0.85

Calls 4

raiseFunction · 0.85
GdsClass · 0.85
displacementToOffsetZoneFunction · 0.85
printfMethod · 0.45

Tested by

no test coverage detected