diff options
author | coletdjnz <colethedj@protonmail.com> | 2022-01-20 15:02:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 20:32:01 +0530 |
commit | 396a76f7bf1623f8c0e90d6305315502da2f6ba7 (patch) | |
tree | 127e86dfb6d142719298ea429eb2097eeda9dfbd /yt_dlp/utils.py | |
parent | 301d07fc4bb37ae3bec607b62d52f3ee6c087df1 (diff) | |
download | hypervideo-pre-396a76f7bf1623f8c0e90d6305315502da2f6ba7.tar.lz hypervideo-pre-396a76f7bf1623f8c0e90d6305315502da2f6ba7.tar.xz hypervideo-pre-396a76f7bf1623f8c0e90d6305315502da2f6ba7.zip |
[youtube] Enforce UTC (#2402)
and [utils] use `utcnow` in `datetime_from_str`
Related: #2223
Authored by: coletdjnz
Diffstat (limited to 'yt_dlp/utils.py')
-rw-r--r-- | yt_dlp/utils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yt_dlp/utils.py b/yt_dlp/utils.py index d58c68653..89e1ca7fd 100644 --- a/yt_dlp/utils.py +++ b/yt_dlp/utils.py @@ -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': |