Open alvarowolfx opened 5 months ago
When trying to instantiate the PreciseDate class with the zero epoch time, it fails.
@google-cloud/precise-date
Error: TypeError: Cannot convert a BigInt value to a number at PreciseDate
The issue is that this line https://github.com/googleapis/nodejs-precise-date/blob/04b3784b0a9948687cbd98a2be376246589c372c/src/index.ts#L122 , needs to explicitly check for zero values, as zero is a valid PreciseDate.
I'll try to submit a PR later, but in the meantime a hotfix will be applyed on the BigQuery library for this issue by calling PreciseDate.parseFull + preciseDateInstance.setFulltime
PreciseDate.parseFull
preciseDateInstance.setFulltime
Reference issue: https://github.com/googleapis/nodejs-bigquery/issues/1353
When trying to instantiate the PreciseDate class with the zero epoch time, it fails.
Environment details
@google-cloud/precise-date
version: 4.0.0Steps to reproduce
Error: TypeError: Cannot convert a BigInt value to a number at PreciseDate
The issue is that this line https://github.com/googleapis/nodejs-precise-date/blob/04b3784b0a9948687cbd98a2be376246589c372c/src/index.ts#L122 , needs to explicitly check for zero values, as zero is a valid PreciseDate.
I'll try to submit a PR later, but in the meantime a hotfix will be applyed on the BigQuery library for this issue by calling
PreciseDate.parseFull
+preciseDateInstance.setFulltime
Reference issue: https://github.com/googleapis/nodejs-bigquery/issues/1353