无法查询时间戳列上的 firestore 集合

Unable to query firestore collection on timestamp column

我有一个 Firestore 数据库,其中包含 "jobs" 集合中的作业列表。每个作业都有一个结束日期,它是 "timestamp" 数据类型。当我尝试使用 where 条件进行查询时,我在使用 react-native-firebase 模块时没有得到任何数据。

Snapshot of data

下面是我使用的代码:

return db.collection('jobs')
    .where('end', '>=', new Date());

也尝试过:

    .where('end', '>=', new Date().toISOString());

是否有特定数据type/format我必须发送日期值才能匹配?

当我在网络应用程序上使用 Firebase 的标准网络 SDK 时,数据正确返回。

我们在通过 React Native 桥进行日期转换时遇到了问题,我们已经修复了这个问题,该修复将在第二天左右的 v3.1.0 版本中发布。

在我们的测试中可以看到一个日期查询的例子:https://github.com/invertase/react-native-firebase/blob/master/tests/src/tests/firestore/collectionReferenceTests.js#L523

所以你查询正确 .where('end', '>=', new Date());

谢谢