[youtube] Enforce UTC (#2402)
and [utils] use `utcnow` in `datetime_from_str` Related: #2223 Authored by: coletdjnz
This commit is contained in:
parent
301d07fc4b
commit
396a76f7bf
2 changed files with 7 additions and 5 deletions
|
|
@ -1846,7 +1846,7 @@ def datetime_from_str(date_str, precision='auto', format='%Y%m%d'):
|
|||
if precision == 'auto':
|
||||
auto_precision = True
|
||||
precision = 'microsecond'
|
||||
today = datetime_round(datetime.datetime.now(), precision)
|
||||
today = datetime_round(datetime.datetime.utcnow(), precision)
|
||||
if date_str in ('now', 'today'):
|
||||
return today
|
||||
if date_str == 'yesterday':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue