Fix Y2K38 bug
Fixed a bug which caused Article::get_metadata() to read timestamps as 32-bit integers, causing issues with timestamps after 2038.
This commit is contained in:
parent
61a0513ad0
commit
1e8660fb86
|
@ -116,7 +116,7 @@ namespace Article {
|
|||
else if (line.find(k_authors) == 0)
|
||||
strncpy(m->authors, line.substr(k_authors.length()).c_str(), sizeof(m->authors));
|
||||
else if (line.find(k_published) == 0)
|
||||
m->publish_ts = atoi(line.substr(k_published.length()).c_str());
|
||||
m->publish_ts = atol(line.substr(k_published.length()).c_str());
|
||||
else
|
||||
std::cerr << "warning: ignoring unknown key/value due to unknown key: " << line << std::endl;
|
||||
} else if (line[0] == '[') {
|
||||
|
|
Loading…
Reference in New Issue