mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-07-08 06:45:11 -05:00
[youtube] Enforce UTC (#2402)
and [utils] use `utcnow` in `datetime_from_str` Related: #2223 Authored by: coletdjnz
This commit is contained in:
@ -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':
|
||||
|
Reference in New Issue
Block a user