SickragePVR/SickRage — pull request #105 by Prinz23 (2014-11-05 11:48:25+00:00)
Title: Move local/network setting datetime convert in it's own function

It's not a good idea to create a wrong datetime object in parse_date_time, because other functions may and should expect that the returned timezone aware datetime is correct regardless of the users displaying preferences.

Always correct datetimes are needed so that sortings and filters work correctly, for example to detect if a episode really already has aired or not.

For example: the ical Feed function needs always the correct timezone aware datetime. So currently the ical Feed is wrong if Setting is not "local".

So I added a new function convert_to_setting in the sbdatetime module that does the convert. So now the time is really only converted when needed for displaying according to the users setting.