accept iso date format (2008-09-05T11:55:32)
This commit is contained in:
parent
a034b4996f
commit
4876574e3e
@ -361,7 +361,10 @@ MyHtmlParser::opening_tag(const string &tag, const map<string,string> &p)
|
|||||||
decode_entities(tmp);
|
decode_entities(tmp);
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
if (strptime(tmp.c_str(),
|
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];
|
char ascuxtime[100];
|
||||||
sprintf(ascuxtime, "%ld", (long)mktime(&tm));
|
sprintf(ascuxtime, "%ld", (long)mktime(&tm));
|
||||||
dmtime = ascuxtime;
|
dmtime = ascuxtime;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user