summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2013-09-24 13:43:09 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2013-09-24 13:43:09 (GMT)
commit30fac51ca6e83b70ef92b745d8a71163988f41ac (patch)
tree8d0b74f0ce6f1ccdb3993fe790c15f998365913f
parentf04a133cd74833cbdac2fd69ef117cc8098d190c (diff)
downloadcollective.solr-30fac51ca6e83b70ef92b745d8a71163988f41ac.zip
collective.solr-30fac51ca6e83b70ef92b745d8a71163988f41ac.tar.gz
collective.solr-30fac51ca6e83b70ef92b745d8a71163988f41ac.tar.bz2
let iso8601date handle strings
-rw-r--r--src/collective/solr/mangler.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/collective/solr/mangler.py b/src/collective/solr/mangler.py
index ee6f2c3..9701d87 100644
--- a/src/collective/solr/mangler.py
+++ b/src/collective/solr/mangler.py
@@ -32,6 +32,8 @@ ignored = 'use_solr', '-C'
def iso8601date(value):
""" convert `DateTime` to iso 8601 date format """
+ if isinstance(value, str):
+ value = DateTime(value, datefmt='international')
if isinstance(value, DateTime):
v = value.toZone('UTC')
value = '%04d-%02d-%02dT%02d:%02d:%06.3fZ' % (