Ticket 37. if (ts == "0000-00-00 00:00:00") construction added in the
authorElena Mamontova <helenh463@gmail.com>
Tue, 11 Oct 2016 13:06:39 +0000 (16:06 +0300)
committerElena Mamontova <helenh463@gmail.com>
Tue, 11 Oct 2016 13:06:39 +0000 (16:06 +0300)
readTime() function.

stglibs/common.lib/common.cpp

index 2b10af2..fc7c35c 100644 (file)
@@ -751,6 +751,9 @@ return buf;
 //---------------------------------------------------------------------------
 time_t readTime(const std::string & ts)
 {
+if (ts == "0000-00-00 00:00:00")
+    return 0;
+
 struct tm brokenTime;
 
 brokenTime.tm_wday = 0;