Comment #1 on issue 15 by
patr...@deadlypenguin.com: Does not marshall time
fields correctly
http://code.google.com/p/salesforce-beatbox/issues/detail?id=15
It appears to be as easy as adding to following to marshall.py
timeregx = re.compile(r'(\d{2}):(\d{2}):(\d{2})(\.\d+)(.*)') # Line 12
# Line 115
def timeMarshaller(fieldname, xml, ns):
timestr = str(xml[getattr(ns,fieldname)])
match = timeregx.match(timestr)
if match:
grps = match.groups()
hour = int(grps[0])
minute = int(grps[1])
second = int(grps[2])
secfrac = float(grps[3])
microsecond = int(secfrac * (10**6))
tz = grps[4] # XXX not sure if I need to do anything with this.
sofar
# times appear to be UTC
return datetime.time(hour, minute, second, microsecond)
return None
register('time', timeMarshaller)