Commit 484a3ba8 authored by Łukasz Nowak's avatar Łukasz Nowak

Simply convert datetimes into string representation.

parent 412cc272
...@@ -4,6 +4,7 @@ from Products.ERP5Type import Permissions, PropertySheet, interfaces ...@@ -4,6 +4,7 @@ from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.Document import newTempDocument from Products.ERP5Type.Document import newTempDocument
import hashlib import hashlib
import datetime
try: try:
import suds import suds
...@@ -50,6 +51,9 @@ else: ...@@ -50,6 +51,9 @@ else:
if k in ['transmissionDate', 'presentationDate', 'cardExpirationDate', if k in ['transmissionDate', 'presentationDate', 'cardExpirationDate',
'markDate', 'authDate', 'captureDate']: 'markDate', 'authDate', 'captureDate']:
# crazyiness again # crazyiness again
if isinstance(v, datetime.datetime):
v = v.strftime('%Y%m%d')
else:
v = time.strftime('%Y%m%d', time.strptime(str(v), '%Y-%m-%d %H:%M:%S')) v = time.strftime('%Y%m%d', time.strptime(str(v), '%Y-%m-%d %H:%M:%S'))
v = str(v) v = str(v)
signature += v + '+' signature += v + '+'
......
28 29
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment