We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b36e426 + 755a94d commit c483c60Copy full SHA for c483c60
1 file changed
gcloud/datastore/helpers.py
@@ -1,6 +1,6 @@
1
"""Helper methods for dealing with Cloud Datastore's Protobuf API."""
2
import calendar
3
-from datetime import datetime
+from datetime import datetime, timedelta
4
5
import pytz
6
@@ -79,7 +79,7 @@ def get_value_from_protobuf(pb):
79
if pb.value.HasField('timestamp_microseconds_value'):
80
microseconds = pb.value.timestamp_microseconds_value
81
return (datetime.utcfromtimestamp(0) +
82
- datetime.timedelta(microseconds=microseconds))
+ timedelta(microseconds=microseconds))
83
84
elif pb.value.HasField('key_value'):
85
return Key.from_protobuf(pb.value.key_value)
0 commit comments