Skip to content

Commit

Permalink
Fixed #61 - Missing timedelta import.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgeewax committed Mar 15, 2014
1 parent b36e426 commit 755a94d
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 755a94d

Please sign in to comment.