mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Fixes default date on saved chat logs (#13564)
* save chatlog fix getMonth is 0-indexed in js for w/e reason, needs +1 getDay returns day of the week (monday = 1), not day of the month * cl * .yml
This commit is contained in:
@@ -933,7 +933,7 @@ $(function() {
|
||||
var blob = new Blob(['<head><title>Chat Log</title><style>', styleData, '</style></head><body>', $messages.html(), '</body>']);
|
||||
|
||||
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';
|
||||
|
||||
@@ -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."
|
||||
Reference in New Issue
Block a user