Skip to content

Commit

Permalink
Merge pull request #62 from jgeewax/master
Browse files Browse the repository at this point in the history
Fixed #61 - Missing timedelta import.
  • Loading branch information
jgeewax committed Mar 15, 2014
2 parents b36e426 + 755a94d commit c483c60
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gcloud/datastore/helpers.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Helper methods for dealing with Cloud Datastore's Protobuf API."""
import calendar
from datetime import datetime
from datetime import datetime, timedelta

import pytz

Expand Down Expand Up @@ -79,7 +79,7 @@ def get_value_from_protobuf(pb):
if pb.value.HasField('timestamp_microseconds_value'):
microseconds = pb.value.timestamp_microseconds_value
return (datetime.utcfromtimestamp(0) +
datetime.timedelta(microseconds=microseconds))
timedelta(microseconds=microseconds))

elif pb.value.HasField('key_value'):
return Key.from_protobuf(pb.value.key_value)
Expand Down

0 comments on commit c483c60

Please sign in to comment.