6
6
"""
7
7
8
8
import calendar
9
- from datetime import datetime
9
+ from datetime import datetime , timezone
10
10
from datetime import timedelta
11
11
import re
12
12
import sys
@@ -175,7 +175,7 @@ def time_in_a_while(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0
175
175
:return: UTC time
176
176
"""
177
177
delta = timedelta (days , seconds , microseconds , milliseconds , minutes , hours , weeks )
178
- return datetime .utcnow ( ) + delta
178
+ return datetime .now ( timezone . utc ) + delta
179
179
180
180
181
181
def time_a_while_ago (days = 0 , seconds = 0 , microseconds = 0 , milliseconds = 0 , minutes = 0 , hours = 0 , weeks = 0 ):
@@ -185,7 +185,7 @@ def time_a_while_ago(days=0, seconds=0, microseconds=0, milliseconds=0, minutes=
185
185
minutes[, hours[, weeks]]]]]]])
186
186
"""
187
187
delta = timedelta (days , seconds , microseconds , milliseconds , minutes , hours , weeks )
188
- return datetime .utcnow ( ) - delta
188
+ return datetime .now ( timezone . utc ) - delta
189
189
190
190
191
191
def in_a_while (days = 0 , seconds = 0 , microseconds = 0 , milliseconds = 0 , minutes = 0 , hours = 0 , weeks = 0 , format = TIME_FORMAT ):
0 commit comments