accept iso date format (2008-09-05T11:55:32)

This commit is contained in:
dockes 2008-09-05 10:33:27 +00:00
parent a034b4996f
commit 4876574e3e

View File

@ -361,7 +361,10 @@ MyHtmlParser::opening_tag(const string &tag, const map<string,string> &p)
decode_entities(tmp);
struct tm tm;
if (strptime(tmp.c_str(),
" %Y-%m-%d %H:%M:%S ", &tm)) {
" %Y-%m-%d %H:%M:%S ", &tm) ||
strptime(tmp.c_str(),
"%Y-%m-%dT%H:%M:%S", &tm)
) {
char ascuxtime[100];
sprintf(ascuxtime, "%ld", (long)mktime(&tm));
dmtime = ascuxtime;