Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Allow sending a string of the encoded datetime instead of having to s…
Browse files Browse the repository at this point in the history
…end an actual datetime object.
  • Loading branch information
kopertop committed Dec 10, 2009
1 parent 46b4d1c commit ddd1f9c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions boto/sdb/db/manager/sdbmanager.py
Expand Up @@ -214,6 +214,8 @@ def decode_float(self, value):
return float(mantissa + 'e' + exponent)

def encode_datetime(self, value):
if isinstance(value, str) or isinstance(value, unicode):
return value
return value.strftime(ISO8601)

def decode_datetime(self, value):
Expand Down

0 comments on commit ddd1f9c

Please sign in to comment.