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

Function decodeTimeTzWithFallback

src/yvalve/utl.cpp:665–694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

663}
664
665void 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, &times, &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
696void UtilInterface::decodeTimeTz(CheckStatusWrapper* status, const ISC_TIME_TZ* timeTz,
697 unsigned* hours, unsigned* minutes, unsigned* seconds, unsigned* fractions,

Callers 2

decodeTimeTzMethod · 0.85
decodeTimeTzExMethod · 0.85

Calls 2

formatFunction · 0.85
stuffExceptionMethod · 0.45

Tested by

no test coverage detected