]> git.stg.codes - stg.git/commitdiff
Ticket 37. if (year < 1990) checking added in the ts2time() function.
authorElena Mamontova <helenh463@gmail.com>
Thu, 17 Nov 2016 08:06:55 +0000 (10:06 +0200)
committerMaxim Mamontov <faust.madf@gmail.com>
Thu, 22 Dec 2016 19:32:59 +0000 (21:32 +0200)
projects/stargazer/plugins/store/firebird/firebird_store_utils.cpp

index 96eb817d64b8e24f78128b81013a8eeeb2ddf22f..bbbc879438a2aeeae5c1ff782b708e6247fc886c 100644 (file)
@@ -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);