| 143 | } |
| 144 | |
| 145 | inline time_t str2date(const TString& dateStr) { |
| 146 | struct tm dateTm; |
| 147 | memset(&dateTm, 0, sizeof(tm)); |
| 148 | strptime(dateStr.data(), "%Y%m%d", &dateTm); |
| 149 | return mktime(&dateTm); |
| 150 | } |
| 151 | |
| 152 | // checks whether time2 > time1 and close enough to it |
| 153 | inline bool AreTimesSeqAndClose(time_t time1, time_t time2, time_t closeInterval = 10) { |