diff --git a/code/modules/goonchat/browserassets/js/browserOutput.js b/code/modules/goonchat/browserassets/js/browserOutput.js index 1146c8b98d8..979299c1d5d 100644 --- a/code/modules/goonchat/browserassets/js/browserOutput.js +++ b/code/modules/goonchat/browserassets/js/browserOutput.js @@ -933,7 +933,7 @@ $(function() { var blob = new Blob(['Chat Log', $messages.html(), '']); var fname = 'SS13 Chat Log'; - var date = new Date(), month = date.getMonth(), day = date.getDay(), hours = date.getHours(), mins = date.getMinutes(), secs = date.getSeconds(); + var date = new Date(), month = date.getMonth() + 1, day = date.getDate(), hours = date.getHours(), mins = date.getMinutes(), secs = date.getSeconds(); fname += ' ' + date.getFullYear() + '-' + (month < 10 ? '0' : '') + month + '-' + (day < 10 ? '0' : '') + day; fname += ' ' + (hours < 10 ? '0' : '') + hours + (mins < 10 ? '0' : '') + mins + (secs < 10 ? '0' : '') + secs; fname += '.html'; diff --git a/html/changelogs/llywelwyn-save-chat-log-date-fix.yml b/html/changelogs/llywelwyn-save-chat-log-date-fix.yml new file mode 100644 index 00000000000..08641c98faa --- /dev/null +++ b/html/changelogs/llywelwyn-save-chat-log-date-fix.yml @@ -0,0 +1,6 @@ +author: Llywelwyn + +delete-after: True + +changes: + - bugfix: "Fixes date when using 'save chat log'. Now gives the correct month and date."