Immediately make a reservation that with JS I'm on you. On the Internet, I found an option how to change the time (for example, a comment, or publication of an article), according to the user's time offset, based on it wrote a script. Actually the script itself:
var date_with_offset = new Date().getTimezoneOffset() * 60000; $(".datetime-convert").each(function() { var offsetDate = new Date(parseDatetime($(this).text()).getTime() + -date_with_offset); $(this).text(offsetDate.toLocaleString()); }); function parseDatetime(value) { var a = /^(\d{2}).(\d{2}).(\d{4}) (\d{2}):(\d{2}):(\d{2})$/.exec(value); if (a) { return new Date(+a[3], +a[2] - 1, +a[1], +a[4], +a[5], +a[6]); } return null; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="datetime-convert">24.02.2017 12:00:00</div> As you can see, the date is displayed in the format: 02/24/2017 12:00:00.
Is it possible to display this way: February 24, 2017 12:00:00. And if so, how?