fixed firefox issue

This commit is contained in:
Levi 2017-06-23 00:30:31 -05:00
parent 8c7687fe7c
commit 720270bac5
2 changed files with 3 additions and 4 deletions

View file

@ -86,9 +86,8 @@
<script type="text/javascript">
window.onload = function () {
var locale_date = new Date(document.getElementById("order-created_at").textContent + ' UTC');
var locale_date = moment.utc(document.getElementById("order-created_at").textContent,'YYYY-MM-DD HH:mm').toDate();
locale_date = moment(locale_date).format("YYYY-MM-DD h:mm:ss a");
console.log("locale_date");
document.getElementById('order-created_at').innerHTML = locale_date;
};

View file

@ -98,9 +98,9 @@
window.onload = function () {
{% for user_key in keys %}
var locale_date = new Date(document.getElementById("ssh-created_at-{{user_key.id}}").textContent + ' UTC');
// var locale_date = new Date(document.getElementById("ssh-created_at-{{user_key.id}}").textContent).toISOString();
var locale_date = moment.utc(document.getElementById("ssh-created_at-{{user_key.id}}").textContent,'YYYY-MM-DD HH:mm').toDate();
locale_date = moment(locale_date).format("YYYY-MM-DD h:mm:ss a");
console.log(locale_date);
document.getElementById('ssh-created_at-{{user_key.id}}').innerHTML = locale_date;
{% endfor %}