GNOME Bugzilla – Bug 148637
Prevent wrapping of dates beyond 2038
Last modified: 2021-06-09 20:31:46 UTC
You can easily reproduce this error on a Linux machine by adding a task at say 8000 days (from year 2004), and then in gantt zoom out and scroll to 2030's and then dragging the end date handle to try and go beyond beyond 2037 or so (about 8600 days - but I'm assuming this is the 32bit Unix time limit. It wraps around back to the current project start but also raises the asserts on a console you will get, ** (planner:2728): CRITICAL **: file mrp-project.c: line 1915 (mrp_project_calculate_task_work): assertion `finish >= 0' failed It also renders date bar in gantt in the 2030's not very nicely and takes a long time to render this one task (in pango routines ?) Though these far-in-the-future dates sound silly there are a number of things in business which must be stored and planned for with long periods of time such as Insurance and maintenance schedules for buildings e.g. Employers' Liability insurance records in UK must be kept for 40 years.
I have fixed this will email planner-dev. we really need to look at using something different for mrptime to allow Planner to be used for dates beyond 2038 ;)
There is nothing we can do about this really. There is no usable replacement for time_t and struct tm that handles dates beyond 2038 that I have seen, expect for 64 bit version of those on 64 bit platforms (and 32 bit platforms on some proprietary unixes). What we can do short-term is to make sure that you can't go beyond the limit so that Planner doesn't spew warnings etc.
OK, there IS something we can do :) The new API I just checked in can be used to provide dates to something like 8000. It would need a bit of work though but it's possible now at least.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/World/planner/-/issues/69.