Commit d6d69bec authored by Sriram Karra's avatar Sriram Karra

convert datetime object iso format before sending gc feed

parent 417e52c5
......@@ -26,6 +26,7 @@
import logging, getopt, re, string, sys, time
from datetime import datetime
import atom, iso8601
import gdata,,, gdata.contacts.client
......@@ -45,7 +46,7 @@ class GCContact(Contact):
if con_itemid:
logging.debug('Potential new GCContact: %s', con.get_name())
logging.debug('Potential new GCContact: %s', con.get_disp_name())
if gce:
......@@ -774,7 +775,7 @@ class GCContact(Contact):
if c:
ud =
ud.key = 'created'
ud.value = c
ud.value = c.isoformat() if isinstance(c, datetime) else c
for key, val in self.get_custom().iteritems():
......@@ -783,6 +784,7 @@ class GCContact(Contact):
if val and not key in ['gids']:
ud =
ud.key = key
val = val.isoformat() if isinstance(val, datetime) else val
ud.value = val
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