After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 148637 - Prevent wrapping of dates beyond 2038
Prevent wrapping of dates beyond 2038
Status: RESOLVED OBSOLETE
Product: planner
Classification: Other
Component: General
0.12
Other All
: Low minor
: 1.0
Assigned To: Lincoln Phipps
planner-maint
Depends on:
Blocks:
 
 
Reported: 2004-07-28 01:56 UTC by Lincoln Phipps
Modified: 2021-06-09 20:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Lincoln Phipps 2004-07-28 01:56:43 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.
Comment 1 Lincoln Phipps 2004-08-08 07:52:28 UTC
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 ;) 
Comment 2 Richard Hult 2005-03-05 10:25:29 UTC
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.
Comment 3 Richard Hult 2005-03-15 00:06:47 UTC
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.
Comment 4 GNOME Infrastructure Team 2021-06-09 20:31:46 UTC
-- 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.