Closed alexprice1 closed 9 years ago
new Date() returns the server's time. You should use Date.now(), it returns the UTC time:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now
IIRC, mongo only stores dates in UTC time.
new Date() returns the server's time. You should use Date.now(), it returns the UTC time:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now