Menu
  • HOME
  • TAGS

mongodb date not matching with the given value

php,mongodb,date,mongodate

Probably because dates in mongodb are stored in UTC, and you are using a different timezone on PHP Try setting this in the beginning of your PHP script to use UTC timezone: date_default_timezone_set('UTC'); ...