Skip to content

Commit daaa4b3

Browse files
Merge remote-tracking branch '38971/improved-date-format-of-js-console-messages' into comprs_nov
2 parents f6924b4 + 2fc5ca5 commit daaa4b3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/code/Magento/Ui/view/base/web/js/lib/logger/formatter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ define([
1818
* @protected
1919
* @type {String}
2020
*/
21-
this.dateFormat_ = 'YYYY-MM-DD hh:mm:ss';
21+
this.dateFormat_ = 'YYYY-MM-DD HH:mm:ssZ';
2222

2323
/**
2424
* @protected

dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/lib/logger/formatter.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ define([
2424
timestamp: Date.now()
2525
};
2626

27-
date = moment(entry.timestamp).format('YYYY-MM-DD hh:mm:ss');
27+
date = moment(entry.timestamp).format('YYYY-MM-DD HH:mm:ssZ');
2828

2929
expect(formatter.process(entry)).toBe('[' + date + '] [DEBUG] message text');
3030
});
@@ -43,7 +43,7 @@ define([
4343
}
4444
};
4545

46-
date = moment(entry.timestamp).format('YYYY-MM-DD hh:mm:ss');
46+
date = moment(entry.timestamp).format('YYYY-MM-DD HH:mm:ssZ');
4747

4848
expect(formatter.process(entry)).toBe('[' + date + '] [DEBUG] Foo Bar');
4949
});

0 commit comments

Comments
 (0)