summaryrefslogtreecommitdiffstats
path: root/tabellio
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2011-11-02 10:31:46 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2011-11-02 10:33:36 (GMT)
commit4b47cc6322cb09ceee0bbce15f8e80d5a05c4c7e (patch)
tree08023ccbbc931f3aec4ea9343ffb6e581e660598 /tabellio
parent503179ed40b1872b5efa20601b20b3213e0f0131 (diff)
downloadtabellio.pcfdb-4b47cc6322cb09ceee0bbce15f8e80d5a05c4c7e.zip
tabellio.pcfdb-4b47cc6322cb09ceee0bbce15f8e80d5a05c4c7e.tar.gz
tabellio.pcfdb-4b47cc6322cb09ceee0bbce15f8e80d5a05c4c7e.tar.bz2
fixes for event date/time
Diffstat (limited to 'tabellio')
-rw-r--r--tabellio/pcfdb/sync.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tabellio/pcfdb/sync.py b/tabellio/pcfdb/sync.py
index 98c6b7e..97c71bb 100644
--- a/tabellio/pcfdb/sync.py
+++ b/tabellio/pcfdb/sync.py
@@ -756,7 +756,7 @@ class SyncFromPcfDbView(BrowserView):
'%Y-%m-%d %H:%M:%S')
else:
object.start = datetime.datetime.strptime(
- datedeb, '%Y-%m-%d')
+ '%s' % datedeb, '%Y-%m-%d')
if datefin:
if heurefin:
object.end = datetime.datetime.strptime(
@@ -764,7 +764,9 @@ class SyncFromPcfDbView(BrowserView):
'%Y-%m-%d %H:%M:%S')
else:
object.end = datetime.datetime.strptime(
- datefin, '%Y-%m-%d')
+ '%s' % datefin, '%Y-%m-%d')
+ if object.end < object.start:
+ object.end = object.start
# XXX: other attributes