• spandya
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

I'm trying to use the Salesforce SOAP API in python to poll for updated items in a Salesforce account. I'm stuck on code that looks like this:

 

pollingInterval = 5 * 60 # 5 minutes

now = s.getServerDatetime()

updatedContacts = s.getUpdated('Contact', now - datetime.timedelta(seconds=pollingInterval), now)

 

where s.getUpdated(...) just calls the SOAP function "getUpdated." I've set the time  range to be starting from 5 minutes in the past and ending at the current moment. This doesn't return any data. The "latestDateCovered" is always several hours in the past. If I set the end date to be some point in the future (such as 100 days), it returns some data, but it returns the same data every 5 minutes. In that case, the "latestDateCovered" is the same as the server time. I tried adjusting for my time zone, as well as daylight savings, but to no avail. Does anyone have any idea what the proper way to do this is?

I'm trying to use the Salesforce SOAP API in python to poll for updated items in a Salesforce account. I'm stuck on code that looks like this:

 

pollingInterval = 5 * 60 # 5 minutes

now = s.getServerDatetime()

updatedContacts = s.getUpdated('Contact', now - datetime.timedelta(seconds=pollingInterval), now)

 

where s.getUpdated(...) just calls the SOAP function "getUpdated." I've set the time  range to be starting from 5 minutes in the past and ending at the current moment. This doesn't return any data. The "latestDateCovered" is always several hours in the past. If I set the end date to be some point in the future (such as 100 days), it returns some data, but it returns the same data every 5 minutes. In that case, the "latestDateCovered" is the same as the server time. I tried adjusting for my time zone, as well as daylight savings, but to no avail. Does anyone have any idea what the proper way to do this is?