Merge pull request #937 from coreos-inc/datedisplayff
Fix date display in Firefox
This commit is contained in:
commit
b6cd51ac8d
1 changed files with 4 additions and 1 deletions
|
@ -175,7 +175,10 @@ angular.module('quay').directive('buildLogsView', function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.formatDatetime = function(datetimeString) {
|
$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();
|
return dt.toLocaleString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue