diff --git a/index.html b/index.html
index 922bf6a..80e2574 100644
--- a/index.html
+++ b/index.html
@@ -65,7 +65,7 @@
- {{ bufferline.date }}
+ {{ bufferline.date | date:'HH:mm' }}
diff --git a/js/websockets.js b/js/websockets.js
index 8ff9e91..587531b 100644
--- a/js/websockets.js
+++ b/js/websockets.js
@@ -1,7 +1,3 @@
-Number.prototype.pad = function (len) {
- return (new Array(len+1).join("0") + this).slice(-len);
-}
-
var weechat = angular.module('weechat', ['localStorage']);
weechat.filter('toArray', function () {
'use strict';
@@ -275,8 +271,6 @@ weechat.factory('handlers', ['$rootScope', 'colors', 'pluginManager', function($
var handleLine = function(line, initial) {
var buffer_line = {}
var date = line['date'];
- date = new Date(parseInt(date, 10) * 1000);
- var datestring = date.getHours().pad(2) + ':' + date.getMinutes().pad(2);
var prefix = colors.parse(line['prefix']);
var text = colors.parse(line['message']);
var buffer = line['buffer'];
@@ -309,7 +303,7 @@ weechat.factory('handlers', ['$rootScope', 'colors', 'pluginManager', function($
$rootScope.buffers[buffer]['lines'].push(buffer_line);
- buffer_line['date'] = datestring;
+ buffer_line['date'] = date;
if(!initial && (highlight || _.contains(tags_array, 'notify_private')) ) {
$rootScope.createHighlight(prefix, text, message, buffer, additionalContent);