sarumont / py-trello

Python API wrapper around Trello's API
BSD 3-Clause "New" or "Revised" License
945 stars 330 forks source link

Can't set due date for card #241

Closed tzekenster closed 6 years ago

tzekenster commented 6 years ago

From card.py, I found this segment of code

    `def set_due(self, due):  #:due: a datetime object
    datestr = due.strftime('%Y-%m-%dT%H:%M:%S')
    self._set_remote_attribute('due', datestr)
    self.due = datestr`

But in my code, while working on a card, when I enter a date object as an argument in the following date structure (2018-05-04T15:13:25), I can't seem to get it to work.

Does anybody have a clue or a code snippet to share?

tzekenster commented 6 years ago

It worked after changing strftime('%Y-%m-%dT%H:%M:%S') into strftime("%Y-%m-%dT%H:%M:%S.000Z")