Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
util: output Dates with Date.toString not Date.toUTCString
Browse files Browse the repository at this point in the history
  • Loading branch information
aviflax authored and bnoordhuis committed Dec 18, 2011
1 parent b084322 commit ee0a7b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/util.js
Expand Up @@ -181,7 +181,7 @@ function formatValue(ctx, value, recurseTimes) {
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
}
if (isDate(value)) {
return ctx.stylize(Date.prototype.toUTCString.call(value), 'date');
return ctx.stylize(Date.prototype.toString.call(value), 'date');
}
if (isError(value)) {
return formatError(value);
Expand Down
2 changes: 1 addition & 1 deletion test/simple/test-sys.js
Expand Up @@ -31,7 +31,7 @@ assert.equal('[Function]', common.inspect(function() {}));
assert.equal('undefined', common.inspect(undefined));
assert.equal('null', common.inspect(null));
assert.equal('/foo(bar\\n)?/gi', common.inspect(/foo(bar\n)?/gi));
assert.equal('Sun, 14 Feb 2010 11:48:40 GMT',
assert.equal('Sun Feb 14 2010 12:48:40 GMT+0100 (CET)',
common.inspect(new Date('Sun, 14 Feb 2010 11:48:40 GMT')));

assert.equal("'\\n\\u0001'", common.inspect('\n\u0001'));
Expand Down

0 comments on commit ee0a7b9

Please sign in to comment.