I\'m trying to transfer my application database from Mysql to Mongodb, but I met a problem with datetime queries.
In Mysql, when there is a datetime or timestamp col
MongoDB stores all dates and times in UTC. This allows the timezone support and translation to be done application side instead of server side.
The best way to store dates and times is via the Javascript Date object. This will allow you to convert dates to and from Unix timestamps, using getTime() and Date(milliseconds).
It should be noted, that Javascript stores time in milliseconds since UNIX Epoch, whilst the standard UNIX timestamp is in seconds since Epoch.