Skip to content

Commit 9e646c6

Browse files
authored
Fix timezone-awareness
1 parent 47c024b commit 9e646c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/timeout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
async def timeout(ctx, member: discord.Member, minutes: int):
1010
"""Set timeout on a member"""
1111

12-
now = datetime.datetime.utcnow() # get current time
12+
now = discord.utils.utcnow() # get current time
1313
until = now + datetime.timedelta(minutes=minutes) # add the duration
1414
await member.timeout(until=until)
1515
await ctx.respond(f"Member timed out for {minutes} minutes.")

0 commit comments

Comments
 (0)