Store datetime as native db types instead of seconds
|Reported by:||Owned by:||Jonas Borgström|
|Severity:||normal||Keywords:||datetime 2038 consider|
Entering a date for a milesone later than some point in 2038 is not supported. I encountered this when entering 2099 as the year, in order to make a milestone strictly a "future" milestone.
Why go to the effort of doing this? Ask yourself if it's the right thing to do to a user.
I assume you use the number of seconds in Unix time to sort dates. I suggest that this is a suboptimal method of comparing dates, and that a better one should be used.
Traceback (most recent call last): File "C:\Python23\Lib\site-packages\trac\web\standalone.py", line 303, in _do_trac_req dispatch_request(path_info, req, env) File "C:\Python23\Lib\site-packages\trac\web\main.py", line 139, in dispatch_request dispatcher.dispatch(req) File "C:\Python23\Lib\site-packages\trac\web\main.py", line 107, in dispatch resp = chosen_handler.process_request(req) File "C:\Python23\Lib\site-packages\trac\ticket\roadmap.py", line 355, in process_request self._do_save(req, db, milestone) File "C:\Python23\Lib\site-packages\trac\ticket\roadmap.py", line 393, in _do_save milestone.due = due and parse_date(due) or 0 File "C:\Python23\Lib\site-packages\trac\util.py", line 453, in parse_date seconds = time.mktime(date) OverflowError: mktime argument out of range
(Assigned to the ticket component, because a very superficial code read shows that ticket.model.Milestone appears to be the root source of the error)
Change History (4)
comment:3 by , 15 years ago
|Keywords:||datetime added; time removed|
|Priority:||normal → low|
|Summary:||Dates Beyond 2038 Not Supported → Store datetime as native db types instead of seconds|