~saurabhanandiit/gtg/exportFixed

« back to all changes in this revision

Viewing changes to GTG/backends/backend_rtm.py

  • Committer: Izidor Matušov
  • Date: 2012-02-29 10:06:41 UTC
  • mfrom: (1098 gtg)
  • mto: This revision was merged to the branch mainline in revision 1103.
  • Revision ID: izidor.matusov@gmail.com-20120229100641-q1uns4yqz1fem2z4
Merged with the current trunk & solved problems with offset

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
from GTG.backends.syncengine            import SyncEngine, SyncMeme
38
38
from GTG.backends.rtm.rtm               import createRTM, RTMError, RTMAPIError
39
39
from GTG.backends.periodicimportbackend import PeriodicImportBackend
40
 
from GTG.tools.dates                    import RealDate, NoDate
 
40
from GTG.tools.dates                    import Date
41
41
from GTG.core.task                      import Task
42
42
from GTG.tools.interruptible            import interruptible
43
43
from GTG.tools.logger                   import Log
461
461
        #rtm tags are lowercase only
462
462
        if rtm_task_tags != [t.lower() for t in tags]:
463
463
            self.__call_or_retry(rtm_task.set_tags, tags, transaction_ids)
464
 
        if isinstance(task.get_due_date(), NoDate):
465
 
            due_date = None
466
 
        else:
467
 
            due_date = task.get_due_date().to_py_date()
 
464
        due_date = task.get_due_date()
468
465
        if rtm_task.get_due_date() != due_date:
469
466
            self.__call_or_retry(rtm_task.set_due_date, due_date,
470
467
                                 transaction_ids)
940
937
        '''
941
938
        due = self.rtm_task.due
942
939
        if due == "":
943
 
            return NoDate()
 
940
            return Date.no_date()
944
941
        date = self.__time_rtm_to_datetime(due).date()
945
 
        if date:
946
 
            return RealDate(date)
947
 
        else:
948
 
            return NoDate()
 
942
        return Date(date)
949
943
 
950
944
    def set_due_date(self, due, transaction_ids = []):
951
945
        '''