Authored by: Lesmiscore, Grub4K
Fixes https://github.com/yt-dlp/yt-dlp/pull/6056
def time_seconds(**kwargs):
- t = datetime.datetime.now(datetime.timezone(datetime.timedelta(**kwargs)))
- return t.timestamp()
+ """
+ Returns TZ-aware time in seconds since the epoch (1970-01-01T00:00:00Z)
+ """
+ return time.time() + datetime.timedelta(**kwargs).total_seconds()
# create a JSON Web Signature (jws) with HS256 algorithm