mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-21 13:45:44 +01:00
[bug] Fixing the timestamp
getMonth() is 0-based, so changing the offset. getDay() is the day of week, not day of the month. Ensuring hours & minutes are always two digits.
This commit is contained in:
parent
fabc45f496
commit
0345daf359
@ -647,8 +647,8 @@ let Terminal = {
|
||||
},
|
||||
|
||||
getTimestamp: function() {
|
||||
let d = new Date();
|
||||
return (d.getMonth() + "/" + d.getDay() + " " + d.getHours() + ":" + d.getMinutes());
|
||||
const d = new Date();
|
||||
return `${d.getMonth() + 1}/${d.getDate()} ${`0${d.getHours()}`.slice(-2)}:${`0${d.getMinutes()}`.slice(-2)}`;
|
||||
},
|
||||
|
||||
finishAction: function(cancelled = false) {
|
||||
|
Loading…
Reference in New Issue
Block a user