1
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-03-09 12:50:23 -05:00

Use Japan timezone

This commit is contained in:
fireattack 2025-02-05 13:33:11 +08:00
parent ebf9af3364
commit c372c1bd7c

View file

@ -148,7 +148,7 @@ def _real_extract(self, url):
onair_label = str_or_none(episode_content.get('broadcastDateLabel'))
if mobj := re.search(r'(\d+)月(\d+)日', onair_label):
year = dt.datetime.now().year
year = dt.datetime.now(dt.timezone(dt.timedelta(hours=9))).year
month, day = map(int, mobj.groups())
release_year = year
release_date = dt.datetime(year, month, day).strftime('%Y%m%d')