Changes between Initial Version and Version 4 of Ticket #5748
- Timestamp:
- Jan 26, 2016, 1:47:41 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #5748
- Property Owner changed from mikechml to Marc
-
Property
Status
changed from
new
toclosed
-
Property
Resolution
changed from
to
fixed
-
Ticket #5748 – Description
initial v4 1 1 I'm running the current subversion version (r6459) of the 2.2-dev branch of the plugin, over a 0.11.5 trac. I see the following error when I perform a "search code reviews" and specify a date for "Reviews after date": 2 2 3 {{{ 3 4 Most recent call last: 4 5 … … 106 107 File "build/bdist.linux-i686/egg/codereview/peerReviewSearch.py", line 52, in process_requestFile "build/bdist.linux-i686/egg/codereview/peerReviewSearch.py", line 138, in performSearchFile "/home/arbit/opt/2/x86_64/lib/python2.5/_strptime.py", line 330, in strptime 107 108 (data_string, format)) 109 }}} 108 110 109 111 It is clear that the culprit is the following line in the peerReviewSearch function: 110 112 113 {{{#!python 111 114 t = time.strptime(month + '/' + day + '/' + year[2] + year[3], '%x') 115 }}} 112 116 113 This does not work in all locale, since "%x"means the following, as described in the manual of the time module:117 This does not work in all locale, since `"%x"` means the following, as described in the manual of the time module: 114 118 119 {{{ 115 120 %x: Locale’s appropriate date representation 121 }}} 116 122 117 123 Since the date string constructed by the program is always in a particular format, I suggest changing it to: 118 124 125 {{{#!python 119 126 t = time.strptime(month + '/' + day + '/' + year[2] + year[3], '%m/%d/%y') 127 }}}