From 92f801286d90e89f800f8768e01da2a0be7cd7e8 Mon Sep 17 00:00:00 2001 From: Elena Mamontova Date: Thu, 17 Nov 2016 10:06:55 +0200 Subject: [PATCH 1/1] Ticket 37. if (year < 1990) checking added in the ts2time() function. --- .../stargazer/plugins/store/firebird/firebird_store_utils.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/stargazer/plugins/store/firebird/firebird_store_utils.cpp b/projects/stargazer/plugins/store/firebird/firebird_store_utils.cpp index 96eb817d..bbbc8794 100644 --- a/projects/stargazer/plugins/store/firebird/firebird_store_utils.cpp +++ b/projects/stargazer/plugins/store/firebird/firebird_store_utils.cpp @@ -41,6 +41,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); -- 2.44.2