[core] Fix support for upcoming Python 3.12 (#8130)
This also adds the following test runners: - `3.12-dev` on `ubuntu-latest` - `3.12-dev` on `windows-latest` - `pypy-3.10` on `ubuntu-latest` Authored by: Grub4K
This commit is contained in:
parent
94389b225d
commit
836e06d246
10 changed files with 23 additions and 16 deletions
|
|
@ -2591,7 +2591,7 @@ class YoutubeDL:
|
|||
# Working around out-of-range timestamp values (e.g. negative ones on Windows,
|
||||
# see http://bugs.python.org/issue1646728)
|
||||
with contextlib.suppress(ValueError, OverflowError, OSError):
|
||||
upload_date = datetime.datetime.utcfromtimestamp(info_dict[ts_key])
|
||||
upload_date = datetime.datetime.fromtimestamp(info_dict[ts_key], datetime.timezone.utc)
|
||||
info_dict[date_key] = upload_date.strftime('%Y%m%d')
|
||||
|
||||
live_keys = ('is_live', 'was_live')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue