diff --git a/src/js/index.js b/src/js/index.js index cf5ecb888..5537efda0 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -426,8 +426,8 @@ app.filter('prettyHref', function () { app.filter('prettyDate', function () { // http://ejohn.org/files/pretty.js - return function prettyDate(time) { - var date = new Date(time), + return function prettyDate(utc) { + var date = new Date(utc), // this converts utc into browser timezone and not cloudron timezone! diff = (((new Date()).getTime() - date.getTime()) / 1000) + 30, // add 30seconds for clock skew day_diff = Math.floor(diff / 86400); @@ -449,14 +449,14 @@ app.filter('prettyDate', function () { }); app.filter('prettyLongDate', function () { - return function prettyLongDate(time) { - return moment(time).format('MMMM Do YYYY, h:mm:ss a'); + return function prettyLongDate(utc) { + return moment(utc).format('MMMM Do YYYY, h:mm:ss a'); // this converts utc into browser timezone and not cloudron timezone! }; }); app.filter('prettyShortDate', function () { - return function prettyShortDate(time) { - return moment(time).format('MMMM Do YYYY'); + return function prettyShortDate(utc) { + return moment(utc).format('MMMM Do YYYY'); // this converts utc into browser timezone and not cloudron timezone! }; });