use hh and not h

This commit is contained in:
ChomeNS 2022-08-25 20:48:22 +07:00
parent 55106946ec
commit 4c12832347

View file

@ -8,7 +8,7 @@ module.exports = {
trusted: 0,
execute: function(bot, username, usernameraw, sender, prefix, args) {
const timezone = args.join(' ');
const momented = moment().tz(`${timezone}`).format('dddd, MMMM Do, YYYY, h:mm:ss A');
const momented = moment().tz(`${timezone}`).format('dddd, MMMM Do, YYYY, hh:mm:ss A');
const command = 'minecraft:tellraw @a ' + JSON.stringify(['', {text: 'The current date and time for the timezone ', color: 'white'}, {text: timezone, color: 'aqua'}, {text: ' is: ', color: 'white'}, {text: `${momented}`, color: 'green'}]);
if (timezone.toLowerCase()==='asia/bangkok') {
bot.core.run(command);