diff --git a/lib/util.js b/lib/util.js index ad856671..aac3c5fc 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1013,13 +1013,26 @@ * Gets current date in format yy.mm.dd hh:mm:ss */ this.getDate = function() { - var date = new Date(), + var date = Util.getShortDate(), + time = Util.getTime(), + ret = date + ' ' + time; + + return ret; + }; + + this.getShortDate = function() { + var ret, + date = new Date(), day = date.getDate(), month = date.getMonth() + 1, - year = date.getFullYear(), - lRet = year + '-' + month + '-' + day + ' ' + Util.getTime(); + year = date.getFullYear(); + + if (month <= 9) + month = '0' + month; - return lRet; + ret = year + '.' + month + '.' + day; + + return ret; }; }