|
@ -109,11 +109,12 @@ $(function () { |
|
|
var lastFormat = "local"; |
|
|
var lastFormat = "local"; |
|
|
function switchDateFormat(format) { |
|
|
function switchDateFormat(format) { |
|
|
lastFormat = format; |
|
|
lastFormat = format; |
|
|
var tz = format == "local" ? spacetime().timezone().name : format; |
|
|
|
|
|
$("#log tr").each(function(index, row) { |
|
|
$("#log tr").each(function(index, row) { |
|
|
var s = spacetime(row.getAttribute("data-dt")).goto(tz); |
|
|
|
|
|
$(".date", row).text(s.unixFmt("MMM d")); |
|
|
|
|
|
$(".time", row).text(s.unixFmt("h:mm")); |
|
|
|
|
|
|
|
|
var dt = moment(row.getAttribute("data-dt")); |
|
|
|
|
|
format == "local" ? dt.local() : dt.tz(format); |
|
|
|
|
|
|
|
|
|
|
|
$(".date", row).text(dt.format("MMM D")); |
|
|
|
|
|
$(".time", row).text(dt.format("HH:mm")); |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
// The table is initially hidden to avoid flickering as we convert dates.
|
|
|
// The table is initially hidden to avoid flickering as we convert dates.
|
|
|