]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/store/firebird/firebird_store_utils.cpp
Fix build on Darwin.
[stg.git] / projects / stargazer / plugins / store / firebird / firebird_store_utils.cpp
index 96eb817d64b8e24f78128b81013a8eeeb2ddf22f..582c54451cfc5a8790e634e9d77089c2e92e9142 100644 (file)
  *
  */
 
-#include <cstdio>
-
 #include "firebird_store.h"
+
 #include "stg/ibpp.h"
+#include "stg/common.h"
+
+#include <cstdio>
 
 //-----------------------------------------------------------------------------
 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);