Skip to content

Commit

Permalink
current date
Browse files Browse the repository at this point in the history
  • Loading branch information
sonugopal committed Jul 15, 2018
1 parent 0265f51 commit ef9197d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions routes/news.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ exports.view=function (req,res) {
exports.getnews=function (req,res) {
var now=new Date(Date.now());
console.log(now);
var now=now+330;
now=now.toLocaleString()
console.log(now)
var demo=new Date("Jul 15 2018 16:19:11");

console.log(demo)
news.find({"DisplayDate":{$lt:now},"EndDate":{$gt:now}},function(err, news) {
if(!err){
res.json(news);
Expand Down

0 comments on commit ef9197d

Please sign in to comment.