mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-03-09 12:50:23 -05:00
the line is not too long
This commit is contained in:
parent
0fafc1a8d6
commit
24954d0542
1 changed files with 1 additions and 2 deletions
|
@ -1371,8 +1371,7 @@ def datetime_from_timestamp(timestamp):
|
||||||
# Calling dt.datetime.fromtimestamp with negative timestamps throws error in Windows
|
# Calling dt.datetime.fromtimestamp with negative timestamps throws error in Windows
|
||||||
# Ref: https://github.com/yt-dlp/yt-dlp/issues/5185, https://github.com/python/cpython/issues/94414,
|
# Ref: https://github.com/yt-dlp/yt-dlp/issues/5185, https://github.com/python/cpython/issues/94414,
|
||||||
# https://github.com/yt-dlp/yt-dlp/issues/6706#issuecomment-1496842642
|
# https://github.com/yt-dlp/yt-dlp/issues/6706#issuecomment-1496842642
|
||||||
return (dt.datetime.fromtimestamp(0, dt.timezone.utc)
|
return (dt.datetime.fromtimestamp(0, dt.timezone.utc) + dt.timedelta(seconds=timestamp))
|
||||||
+ dt.timedelta(seconds=timestamp))
|
|
||||||
|
|
||||||
|
|
||||||
def datetime_round(dt_, precision='day'):
|
def datetime_round(dt_, precision='day'):
|
||||||
|
|
Loading…
Reference in a new issue