Skip to content

Commit ee0a7b9

Browse files
aviflaxbnoordhuis
authored andcommitted
util: output Dates with Date.toString not Date.toUTCString
1 parent b084322 commit ee0a7b9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/util.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function formatValue(ctx, value, recurseTimes) {
181181
return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
182182
}
183183
if (isDate(value)) {
184-
return ctx.stylize(Date.prototype.toUTCString.call(value), 'date');
184+
return ctx.stylize(Date.prototype.toString.call(value), 'date');
185185
}
186186
if (isError(value)) {
187187
return formatError(value);

test/simple/test-sys.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ assert.equal('[Function]', common.inspect(function() {}));
3131
assert.equal('undefined', common.inspect(undefined));
3232
assert.equal('null', common.inspect(null));
3333
assert.equal('/foo(bar\\n)?/gi', common.inspect(/foo(bar\n)?/gi));
34-
assert.equal('Sun, 14 Feb 2010 11:48:40 GMT',
34+
assert.equal('Sun Feb 14 2010 12:48:40 GMT+0100 (CET)',
3535
common.inspect(new Date('Sun, 14 Feb 2010 11:48:40 GMT')));
3636

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

0 commit comments

Comments
 (0)