Skip to content

Commit

Permalink
Fixed googleapis#50 - timestamps need to be int/long, not float.
Browse files Browse the repository at this point in the history
Finally fixed properly this time.
  • Loading branch information
jgeewax committed Feb 27, 2014
1 parent 2c26d9b commit 85eff05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gcloud/datastore/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_protobuf_attribute_and_value(val):
"""

if isinstance(val, datetime):
name, value = 'timestamp_microseconds', time.mktime(val.timetuple())
name, value = 'timestamp_microseconds', long(time.mktime(val.timetuple()))
elif isinstance(val, Key):
name, value = 'key', val.to_protobuf()
elif isinstance(val, bool):
Expand Down

0 comments on commit 85eff05

Please sign in to comment.