How to handle date between India Time on Client side and Server date in US Time via mongo
问题 I have an app where the client location will be in India. My application has to aggregate data based on the daterange client has given. So if the client gives 14-Dec-2016 to 21-Dec-2016. It should search on from 14-Dec-2016 00:00:00am to 21-Dec-2016 23:59:59pm. Now as soon as I send my date to my server it get converted to Dec 13 2016 18:30:00 GMT+0000 (UTC) Dec 21 2016 18:29:59 GMT+0000 (UTC) Now I write my aggregation query as let cursor = Trip.aggregate([{ $match: { startTime: { $gte: