Fix date display in Firefox

Fixes #934
This commit is contained in:
Joseph Schorr 2015-11-20 11:29:05 -05:00
parent 30a552f2c6
commit 37a1b01d77

View file

@ -175,7 +175,10 @@ angular.module('quay').directive('buildLogsView', function () {
};
$scope.formatDatetime = function(datetimeString) {
var dt = new Date(datetimeString);
// Note: The standard format required by the Date constructor in JS is
// "2011-10-10T14:48:00" for date-times. The date-time string we get is exactly that,
// but with a space instead of a 'T', so we just replace it.
var dt = new Date(datetimeString.replace(' ', 'T'));
return dt.toLocaleString();
}