Merge pull request #937 from coreos-inc/datedisplayff

Fix date display in Firefox
This commit is contained in:
josephschorr 2015-11-20 16:38:59 -05:00
commit b6cd51ac8d

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();
}