Makes a time zone id from offsets.
| 1149 | |
| 1150 | // Makes a time zone id from offsets. |
| 1151 | static 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. |
| 1164 | static inline SSHORT offsetZoneToDisplacement(USHORT timeZone) |
no test coverage detected