Saturday 21 December 2019

date changes with time

This is the code that I used:

Published by: <%= rxpost.author.username %> , <%= moment(rxpost.createdAt).format('MMMM D, YYYY') %>

But as the day passes, the date changes. Example, I submitted a post on the 19th, and now it says the 20th. Any ideas how to fix that?

Submitted December 21, 2019 at 11:11AM by nightcrawler99

No comments:

Post a Comment