@@ -5804,7 +5804,7 @@ def test_insert_rows_w_schema(self):
5804
5804
import datetime
5805
5805
from google .cloud ._helpers import UTC
5806
5806
from google .cloud ._helpers import _datetime_to_rfc3339
5807
- from google .cloud ._helpers import _microseconds_from_datetime
5807
+ from google .cloud ._helpers import _RFC3339_MICROS
5808
5808
from google .cloud .bigquery .schema import SchemaField
5809
5809
5810
5810
WHEN_TS = 1437767599.006
@@ -5834,7 +5834,7 @@ def _row_data(row):
5834
5834
result = {"full_name" : row [0 ], "age" : str (row [1 ])}
5835
5835
joined = row [2 ]
5836
5836
if isinstance (joined , datetime .datetime ):
5837
- joined = _microseconds_from_datetime ( joined ) * 1e-6
5837
+ joined = joined . strftime ( _RFC3339_MICROS )
5838
5838
if joined is not None :
5839
5839
result ["joined" ] = joined
5840
5840
return result
@@ -5864,7 +5864,7 @@ def test_insert_rows_w_list_of_dictionaries(self):
5864
5864
import datetime
5865
5865
from google .cloud ._helpers import UTC
5866
5866
from google .cloud ._helpers import _datetime_to_rfc3339
5867
- from google .cloud ._helpers import _microseconds_from_datetime
5867
+ from google .cloud ._helpers import _RFC3339_MICROS
5868
5868
from google .cloud .bigquery .schema import SchemaField
5869
5869
from google .cloud .bigquery .table import Table
5870
5870
@@ -5910,7 +5910,7 @@ def _row_data(row):
5910
5910
row = copy .deepcopy (row )
5911
5911
del row ["joined" ]
5912
5912
elif isinstance (joined , datetime .datetime ):
5913
- row ["joined" ] = _microseconds_from_datetime ( joined ) * 1e-6
5913
+ row ["joined" ] = joined . strftime ( _RFC3339_MICROS )
5914
5914
row ["age" ] = str (row ["age" ])
5915
5915
return row
5916
5916
@@ -6109,16 +6109,16 @@ def test_insert_rows_w_repeated_fields(self):
6109
6109
{
6110
6110
"score" : "12" ,
6111
6111
"times" : [
6112
- 1543665600.0 , # 2018-12-01 12 :00 UTC
6113
- 1543669200.0 , # 2018-12-01 13 :00 UTC
6112
+ " 2018-12-01T12 :00:00.000000Z" ,
6113
+ " 2018-12-01T13 :00:00.000000Z" ,
6114
6114
],
6115
6115
"distances" : [1.25 , 2.5 ],
6116
6116
},
6117
6117
{
6118
6118
"score" : "13" ,
6119
6119
"times" : [
6120
- 1543752000.0 , # 2018-12-02 12 :00 UTC
6121
- 1543755600.0 , # 2018-12-02 13 :00 UTC
6120
+ " 2018-12-02T12 :00:00.000000Z" ,
6121
+ " 2018-12-02T13 :00:00.000000Z" ,
6122
6122
],
6123
6123
"distances" : [- 1.25 , - 2.5 ],
6124
6124
},
0 commit comments