]> git.stg.codes - stg.git/commitdiff
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 2b10af26d59fc7f41c4dceb0c687d383570e5af5..fc7c35ce86c5b19eebc1a569c3120ae2e1fc2ce2 100644 (file)
@@ -751,6 +751,9 @@ return buf;
 //---------------------------------------------------------------------------
 time_t readTime(const std::string & ts)
 {
 //---------------------------------------------------------------------------
 time_t readTime(const std::string & ts)
 {
+if (ts == "0000-00-00 00:00:00")
+    return 0;
+
 struct tm brokenTime;
 
 brokenTime.tm_wday = 0;
 struct tm brokenTime;
 
 brokenTime.tm_wday = 0;