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:
parent
ebf9af3364
commit
c372c1bd7c
1 changed files with 1 additions and 1 deletions
|
@ -148,7 +148,7 @@ def _real_extract(self, url):
|
||||||
onair_label = str_or_none(episode_content.get('broadcastDateLabel'))
|
onair_label = str_or_none(episode_content.get('broadcastDateLabel'))
|
||||||
|
|
||||||
if mobj := re.search(r'(\d+)月(\d+)日', onair_label):
|
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())
|
month, day = map(int, mobj.groups())
|
||||||
release_year = year
|
release_year = year
|
||||||
release_date = dt.datetime(year, month, day).strftime('%Y%m%d')
|
release_date = dt.datetime(year, month, day).strftime('%Y%m%d')
|
||||||
|
|
Loading…
Reference in a new issue