X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/5178870c9c7f80d0c6f1b715d0131320d8f5bc90..0907aa4037b12b6b88ee24495d4577a064d4f8db:/projects/stargazer/plugins/store/firebird/firebird_store_utils.cpp diff --git a/projects/stargazer/plugins/store/firebird/firebird_store_utils.cpp b/projects/stargazer/plugins/store/firebird/firebird_store_utils.cpp index 96eb817d..582c5445 100644 --- a/projects/stargazer/plugins/store/firebird/firebird_store_utils.cpp +++ b/projects/stargazer/plugins/store/firebird/firebird_store_utils.cpp @@ -26,10 +26,12 @@ * */ -#include - #include "firebird_store.h" + #include "stg/ibpp.h" +#include "stg/common.h" + +#include //----------------------------------------------------------------------------- time_t ts2time_t(const IBPP::Timestamp & ts) @@ -41,6 +43,8 @@ time_t ts2time_t(const IBPP::Timestamp & ts) memset(&time_tm, 0, sizeof(time_tm)); ts.GetDate(year, month, day); ts.GetTime(hour, min, sec); + if (year < 1990) + return 0; sprintf(buf, "%d-%d-%d %d:%d:%d", year, month, day, hour, min, sec); stg_strptime(buf, "%Y-%m-%d %H:%M:%S", &time_tm);