Opened 8 years ago
Last modified 8 years ago
#12489 closed defect
ValueError: year=1899 is before 1900; the datetime strftime() methods require year >= 1900 — at Initial Version
Reported by: | Ryan J Ollos | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.12 |
Component: | general | Version: | 1.0.11 |
Severity: | normal | Keywords: | datetime |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Maybe we can raise a TracError
for this case, or add/or a warning to the timeline page.
2016-05-26 14:42:07,161 Trac[main] ERROR: Internal Server Error: <RequestWithSession "GET '/timeline?from=1900-01-02&daysback=7&authors='">, referrer 'https://bugs.jqueryui.com/' Traceback (most recent call last): File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/trac/web/main.py", line 562, in _dispatch_request dispatcher.dispatch(req) File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/trac/web/main.py", line 249, in dispatch resp = chosen_handler.process_request(req) File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/trac/timeline/web_ui.py", line 251, in process_request format='%Y-%m-%d', tzinfo=req.tz) File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/trac/util/datefmt.py", line 318, in format_date return _format_datetime(t, format, tzinfo, locale, 'date') File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/trac/util/datefmt.py", line 299, in _format_datetime return _format_datetime_without_babel(t, format) File "/var/www/bugs.jqueryui.com/private/pve/local/lib/python2.7/site-packages/trac/util/datefmt.py", line 246, in _format_datetime_without_babel text = t.strftime(str(format)) ValueError: year=1899 is before 1900; the datetime strftime() methods require year >= 1900
Note:
See TracTickets
for help on using tickets.