From ce7bad84927e2942ae995d0e53b834d8546db558 Mon Sep 17 00:00:00 2001 From: "duncan.parkes" Date: Sun, 17 Feb 2008 16:02:33 +0000 Subject: [PATCH] As usual, I forgot to make this work with python 2.4. --- trunk/python_scrapers/WAM.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trunk/python_scrapers/WAM.py b/trunk/python_scrapers/WAM.py index 8168a35..705c1f0 100644 --- a/trunk/python_scrapers/WAM.py +++ b/trunk/python_scrapers/WAM.py @@ -86,7 +86,10 @@ class WAMParser: tds = tr.findAll("td") date_received_string = tds[0].contents[0].strip() - self._current_application.date_received = datetime.datetime.strptime(clean_string(date_received_string), self.date_format) + + # Some day we'll be on python 2.5, and we'll be able to use the nicer version below... + self._current_application.date_received = datetime.datetime(*(time.strptime(clean_string(date_received_string), self.date_format)[0:6])) + #self._current_application.date_received = datetime.datetime.strptime(clean_string(date_received_string), self.date_format) relative_info_url = tr.a['href'] info_url_no_params = remove_params(relative_info_url)