MongoDB $dateTrunc aggregation operator doesn't return expected value
I was using $dateTrunc on a timeseries collection to group the timeseries data from 2024-12-01 to 2024-12-07 into a single bin. Here is the aggregate pipeline: [ { $match: { timestamp: { $gte: ISODate('2024-12-01'), $lte: ISODate('2024-12-07'), }, } }, {…