diff --git a/static/js/directives/ui/build-logs-view.js b/static/js/directives/ui/build-logs-view.js index aa7df7d85..a31fe253a 100644 --- a/static/js/directives/ui/build-logs-view.js +++ b/static/js/directives/ui/build-logs-view.js @@ -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(); }