diff --git a/html/index.html b/html/index.html
index 720130e9..9ba463e8 100644
--- a/html/index.html
+++ b/html/index.html
@@ -49,7 +49,7 @@
- Latest build: {{buildStatus.completed | relativeTime}}
+ Latest build: {{completionTime | relativeTime}}
diff --git a/html/js/melpa.js b/html/js/melpa.js
index bcb77c91..40a3c80e 100644
--- a/html/js/melpa.js
+++ b/html/js/melpa.js
@@ -137,7 +137,9 @@
};
app.controller('BuildStatusCtrl', function($scope, packageService) {
- $scope.buildStatus = packageService.buildStatus();
+ packageService.buildStatus().then(function(status) {
+ $scope.completionTime = new Date(status.completed * 1000);
+ });
});
app.controller('AppCtrl', function($scope, $rootScope, $route) {
@@ -220,7 +222,7 @@
//////////////////////////////////////////////////////////////////////////////
app.filter('relativeTime', function() {
return function(val) {
- return val && moment(new Date(val)).fromNow();
+ return val && moment(val).fromNow();
};
});