| 663 | } |
| 664 | |
| 665 | void decodeTimeTzWithFallback(CheckStatusWrapper* status, const ISC_TIME_TZ* timeTz, SLONG gmtFallback, |
| 666 | unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, |
| 667 | unsigned timeZoneBufferLength, char* timeZoneBuffer) |
| 668 | { |
| 669 | try |
| 670 | { |
| 671 | tm times; |
| 672 | int intFractions; |
| 673 | bool tzLookup = TimeZoneUtil::decodeTime(*timeTz, true, gmtFallback, ×, &intFractions); |
| 674 | |
| 675 | if (hours) |
| 676 | *hours = times.tm_hour; |
| 677 | |
| 678 | if (minutes) |
| 679 | *minutes = times.tm_min; |
| 680 | |
| 681 | if (seconds) |
| 682 | *seconds = times.tm_sec; |
| 683 | |
| 684 | if (fractions) |
| 685 | *fractions = (unsigned) intFractions; |
| 686 | |
| 687 | if (timeZoneBuffer) |
| 688 | TimeZoneUtil::format(timeZoneBuffer, timeZoneBufferLength, timeTz->time_zone, !tzLookup, gmtFallback); |
| 689 | } |
| 690 | catch (const Exception& ex) |
| 691 | { |
| 692 | ex.stuffException(status); |
| 693 | } |
| 694 | } |
| 695 | |
| 696 | void UtilInterface::decodeTimeTz(CheckStatusWrapper* status, const ISC_TIME_TZ* timeTz, |
| 697 | unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions, |
no test coverage detected