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:
committed by
GitHub
parent
7017d8fc31
commit
603bf075f1
@@ -52,7 +52,7 @@ std::string renderAttribute (const std::string& name, const std::string& value,
|
||||
col->type () == "date" &&
|
||||
value != "")
|
||||
{
|
||||
Datetime d ((time_t)strtol (value.c_str (), nullptr, 10));
|
||||
Datetime d ((time_t)strtoll (value.c_str (), nullptr, 10));
|
||||
if (format == "")
|
||||
return d.toString (Context::getContext ().config.get ("dateformat"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user