Since this https://issuetracker.google.com/issues/35905946 BigQuery server now accept RFC3339 timestamps, it's inefficient and no longer necessary to do this string replace,
So could you just leave the value as Date#toJSON which is RFC3339 format, more friendly for Javascript to process
https://github.com/GoogleCloudPlatform/google-cloud-node/blob/bigquery-0.9.6/packages/bigquery/src/index.js#L227-L237
BigQuery.timestamp =
BigQuery.prototype.timestamp = function(value) {
if (!(this instanceof BigQuery.timestamp)) {
return new BigQuery.timestamp(value);
}
value = new Date(value);
- value = value.toJSON().replace(/^(.*)T(.*)Z$/, '$1 $2');
+ value = value.toJSON();
this.value = value;
};
Since this https://issuetracker.google.com/issues/35905946 BigQuery server now accept RFC3339 timestamps, it's inefficient and no longer necessary to do this string replace,
So could you just leave the value as
Date#toJSONwhich is RFC3339 format, more friendly for Javascript to processhttps://github.com/GoogleCloudPlatform/google-cloud-node/blob/bigquery-0.9.6/packages/bigquery/src/index.js#L227-L237
BigQuery.timestamp = BigQuery.prototype.timestamp = function(value) { if (!(this instanceof BigQuery.timestamp)) { return new BigQuery.timestamp(value); } value = new Date(value); - value = value.toJSON().replace(/^(.*)T(.*)Z$/, '$1 $2'); + value = value.toJSON(); this.value = value; };