From: Elena Mamontova Date: Thu, 17 Nov 2016 08:06:55 +0000 (+0200) Subject: Ticket 37. if (year < 1990) checking added in the ts2time() function. X-Git-Tag: 2.409~51 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/571f7e13bf33ca91bde1346051d73fca9728965f Ticket 37. if (year < 1990) checking added in the ts2time() function. --- 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);