Fix issues with year 2038 (#3052)

* Fix annotations in year 2038

Fixes #3050

* Ensure 32-bit systems work better after 2038

Without this patch, their 32-bit signed long int could overflow.

This patch was done while working on reproducible builds for openSUSE.
This commit is contained in:
Bernhard M. Wiedemann
2023-08-31 04:08:31 +02:00
committed by GitHub
parent 7017d8fc31
commit 603bf075f1
11 changed files with 19 additions and 19 deletions

View File

@@ -417,7 +417,7 @@ bool getDOM (const std::string& name, const Task* task, Variant& value)
{
// annotation_1234567890
// 0 ^11
value = Variant ((time_t) strtol (i.first.substr (11).c_str (), NULL, 10), Variant::type_date);
value = Variant ((time_t) strtoll (i.first.substr (11).c_str (), NULL, 10), Variant::type_date);
return true;
}
else if (elements[2] == "description")