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
@@ -631,7 +631,7 @@ std::string CmdCalendar::renderMonths (
|
||||
{
|
||||
if(task.has("scheduled") && !coloredWithDue) {
|
||||
std::string scheduled = task.get ("scheduled");
|
||||
Datetime scheduleddmy (strtol (scheduled.c_str(), nullptr, 10));
|
||||
Datetime scheduleddmy (strtoll (scheduled.c_str(), nullptr, 10));
|
||||
|
||||
if (scheduleddmy.sameDay (date))
|
||||
{
|
||||
@@ -640,7 +640,7 @@ std::string CmdCalendar::renderMonths (
|
||||
}
|
||||
if(task.has("due")) {
|
||||
std::string due = task.get ("due");
|
||||
Datetime duedmy (strtol (due.c_str(), nullptr, 10));
|
||||
Datetime duedmy (strtoll (due.c_str(), nullptr, 10));
|
||||
|
||||
if (duedmy.sameDay (date))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user