On Tue, Jun 14, 2016 at 12:51 AM, Chris Cunningham
<
chris.cu...@mongodb.com> wrote:
> I noticed that you have a "Z" in your original date which indicates UTC (aka
> Zulu) time. You can have the documents automatically shift the ISODate by
> specifying the "time offset" as described in [ISO
> 8601](
https://en.wikipedia.org/wiki/ISO_8601#UTC).
>
> For example:
>
> `db.collection.find({ date: { $gte: ISODate('2016-05-31T00:00:00Z'), $lte:
> ISODate('2016-05-31T23:59:59Z') } })`
>
> Would be changed to:
>
> `db.collection.find({ date: { $gte: ISODate('2016-05-31T00:00:00+05:00'),
> $lte: ISODate('2016-05-31T23:59:59+05:00') } })`
Thanks that works. I didn't know you could format the ISOdate queries