We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2084dbc commit c3c325eCopy full SHA for c3c325e
google/cloud/bigquery/_helpers.py
@@ -21,6 +21,7 @@
21
from google.cloud._helpers import _datetime_from_microseconds
22
from google.cloud._helpers import _datetime_to_rfc3339
23
from google.cloud._helpers import _microseconds_from_datetime
24
+from google.cloud._helpers import _RFC3339_NO_FRACTION
25
26
27
def _not_null(value, field):
@@ -57,7 +58,7 @@ def _datetime_from_json(value, field):
57
58
"""Coerce 'value' to a datetime, if set or not nullable."""
59
if _not_null(value, field):
60
# value will be a string, in YYYY-MM-DDTHH:MM:SS form.
- return datetime.datetime.strptime(value, '%Y-%m-%dT%H:%M:%S')
61
+ return datetime.datetime.strptime(value, _RFC3339_NO_FRACTION)
62
63
64
def _date_from_json(value, field):
0 commit comments