Use the et2utc function in case the normal date conversion fails

This commit is contained in:
Alexander Bock
2023-01-26 18:24:30 +01:00
parent 96a261df20
commit ac7bf6f8f7
2 changed files with 16 additions and 3 deletions
+6
View File
@@ -557,6 +557,12 @@ public:
ephemerisTime, format
));
}
if (outBuf[0] == '*') {
// The conversion failed and we need to use et2utc
constexpr int SecondsPrecision = 3;
et2utc_c(ephemerisTime, "C", SecondsPrecision, bufferSize, outBuf);
}
}
std::string dateFromEphemerisTime(double ephemerisTime, const char* format);