I am creating a Discord bot. When you enter the command, it is supposed to give a timestamp of the current time. I did this with strftime. But whenever the command is entered, the hours keep coming up as 00. The minutes and seconds display properly, just the hours is always 00.
@bot.command()
async def start(ctx):
if session.is_active:
await ctx.send("Always look to the future!")
return
session.is_active = True
session.start_time = ctx.message.created_at.timestamp()
human_readable_time = ctx.message.created_at.strftime("%H:%M:%S")
positive_reminder.start()
await ctx.send("Positive thoughts fuel a positive mind. Started at {}".format(human_readable_time))
The message should say exactly what is listed above: Positive thoughts fuel a positive mind. Started at 07.08.32 (Time is a sample)
Output is: Positive thoughts fuel a positive mind. Started at 00.08.32
You need to add timezone info to the timestamp: