Private GIT

Skip to content
Snippets Groups Projects
Commit 0a6e4e70 authored by labrys's avatar labrys
Browse files

Hotfix-3450: Fix airdate of 'Never' while avoiding dateutil issues on Windows

parent d6b80d06
Branches
Tags
No related merge requests found
...@@ -477,9 +477,13 @@ ...@@ -477,9 +477,13 @@
% endif % endif
</td> </td>
<td class="col-airdate"> <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 ## 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)) %> <% 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> <time datetime="${airDate.isoformat('T')}" class="date">${sbdatetime.sbdatetime.sbfdatetime(airDate)}</time>
% else: % else:
Never Never
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment