discord_bot/util/convertDateToISOString.js
2021-07-24 19:44:12 +02:00

3 lines
No EOL
284 B
JavaScript

module.exports = function (date){
return date.getUTCFullYear() + '-' + ('0' + (date.getUTCMonth()+1)).slice(-2) + '-' + ('0' + date.getUTCDate()).slice(-2)+" "+('0' + date.getUTCHours()).slice(-2)+":"+('0' + date.getUTCMinutes()).slice(-2)+":"+('0'+date.getUTCSeconds()).slice(-2);
}