move toEpoch to helpers.cpp, use strptime

This commit is contained in:
Jacek Jendrzej
2014-01-04 20:48:13 +01:00
parent 3bdb1af87e
commit 52741fb1e4
3 changed files with 13 additions and 11 deletions

View File

@@ -3574,17 +3574,6 @@ void CMovieBrowser::autoFindSerie(void)
}
}
}
static time_t toEpoch(std::string &date)
{
struct tm t;
memset(&t, 0, sizeof(t));
if (3 == sscanf(date.c_str(), "%d-%d-%d", &t.tm_year, &t.tm_mon, &t.tm_mday)) {
t.tm_year -= 1900;
t.tm_mon += 1;
return mktime(&t);
}
return 0;
}
void CMovieBrowser::loadYTitles(int mode, std::string search, std::string id)
{