Private GIT

Skip to content
Snippets Groups Projects
Commit dd81ca03 authored by miigotu's avatar miigotu
Browse files

Merge pull request #2997 from labrys/hotfix-3450

Hotfix-3450: Fix airdate of 'Never' while avoiding Windows dateutil issues
parents 1d13d935 0a6e4e70
No related branches found
No related tags found
No related merge requests found
......@@ -477,9 +477,13 @@
% endif
</td>
<td class="col-airdate">
% if int(epResult['airdate']) > 1 and show.network and show.airs:
% if int(epResult['airdate']) != 1:
## Lets do this exactly like ComingEpisodes and History
## Avoid issues with dateutil's _isdst on Windows but still provide air dates
<% airDate = datetime.datetime.fromordinal(epResult['airdate']) %>
% if airDate.year >= 1970 or show.network:
<% airDate = sbdatetime.sbdatetime.convert_to_setting(network_timezones.parse_date_time(epResult['airdate'], show.airs, show.network)) %>
% endif
<time datetime="${airDate.isoformat('T')}" class="date">${sbdatetime.sbdatetime.sbfdatetime(airDate)}</time>
% else:
Never
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment