Ticket #2314 (closed defect: fixed)
parse_rfc_2822 tests failing in some timezones
Reported by: | seanh | Owned by: | icmurray |
---|---|---|---|
Priority: | major | Milestone: | ckan-sprint-2012-05-15 |
Component: | ckan | Keywords: | [0.5d] |
Cc: | Repository: | ckan | |
Theme: | none |
Description
These two tests:
ckan.tests.lib.test_helpers.TestHelpers?.test_parse_rfc_2822_gmt_case
ckan.tests.lib.test_helpers.TestHelpers?.test_parse_rfc_2822_with_offset
have been failing in certain timezones. In the UK they pass, if you're in Germany they'll fail.
The function being tested uses datetime.datetime.fromtimestamp() which uses the local time, but the tests compare the results against hardcoded strings, so the tests cannot work in different timezones.
Change History
Note: See
TracTickets for help on using
tickets.