From 18ff21174e56874c91cdef02cc62e3c675062e5a Mon Sep 17 00:00:00 2001 From: Dan Cryer Date: Wed, 25 Feb 2015 10:33:11 +0000 Subject: [PATCH] Fixing dates: Stop all dates from appearing as the current date/time. Fixes #820 --- public/assets/js/phpci.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/assets/js/phpci.js b/public/assets/js/phpci.js index a2d5954c..0d262235 100644 --- a/public/assets/js/phpci.js +++ b/public/assets/js/phpci.js @@ -9,8 +9,9 @@ var PHPCI = { $(document).ready(function () { // Format datetimes $('time[datetime]').each(function() { - var $this = $(this); - $this.text(moment(this.dateTime).format($this.data('format') || 'lll')); + var thisDate = $(this).attr('datetime'); + var formattedDate = moment(thisDate).format($(this).data('format') || 'lll'); + $(this).text(formattedDate); }); // Update latest builds every 5 seconds: