From 8ccb4189a3026c8081c386acda4e37f091e48e96 Mon Sep 17 00:00:00 2001 From: Michael Mathews Date: Sat, 26 Feb 2011 10:47:46 +0000 Subject: [PATCH] Added year to timestamp. --- modules/common/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/common/util.js b/modules/common/util.js index e642e064..1b57ee34 100644 --- a/modules/common/util.js +++ b/modules/common/util.js @@ -71,14 +71,14 @@ var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', /** * Create a timestamp string. - * @returns {string} Like 26 Feb 16:19:34 + * @returns {string} Like 26 Feb 2011 16:19:34 */ exports.timestamp = function() { var d = new Date(); var time = [pad(d.getHours()), pad(d.getMinutes()), pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); + return [d.getDate(), months[d.getMonth()], d.getFullYear(), time].join(' '); } exports.log = function(msg) {