Repository: ambari Updated Branches: refs/heads/branch-1.7.0 53b9abda0 -> 1ba3e06c0
AMBARI-7708. Jobs Tab shows time in UTC format. (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1ba3e06c Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1ba3e06c Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1ba3e06c Branch: refs/heads/branch-1.7.0 Commit: 1ba3e06c06ac81b3968499fefeef7d9151ad8fda Parents: 53b9abd Author: Aleksandr Kovalenko <[email protected]> Authored: Fri Oct 10 17:40:29 2014 +0300 Committer: Aleksandr Kovalenko <[email protected]> Committed: Fri Oct 10 17:40:29 2014 +0300 ---------------------------------------------------------------------- .../resources/ui/app/scripts/helpers/date.js | 22 +------------------- 1 file changed, 1 insertion(+), 21 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/1ba3e06c/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/date.js ---------------------------------------------------------------------- diff --git a/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/date.js b/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/date.js index b3d163c..99f9489 100644 --- a/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/date.js +++ b/contrib/views/jobs/src/main/resources/ui/app/scripts/helpers/date.js @@ -62,27 +62,7 @@ App.Helpers.date = { format += ':SSS'; } } - return moment((new Date(timestamp)).toISOString().replace('Z', '')).format(format); - }, - - /** - * Convert timestamp to date-string 'DAY_OF_THE_WEEK MONTH DAY YEAR' - * - * @param {string} timestamp - * @return {string} - * @method dateFormatShort - */ - dateFormatShort: function (timestamp) { - if (!App.Helpers.validator.isValidInt(timestamp)) { - return timestamp; - } - var format = 'ddd MMM DD YYYY'; - var date = moment((new Date(timestamp)).toISOString().replace('Z', '')).format(format); - var today = moment((new Date()).toISOString().replace('Z', '')).format(format); - if (date === today) { - return 'Today ' + (new Date(timestamp)).toLocaleTimeString(); - } - return date; + return moment(new Date(timestamp)).format(format); }, /**
