I have a UTC time string like so
supplied_datetime = 20160711230000 -0500
This is the format
yyyyMMddhhmmss +/-hhmm
Now if I take that offset (-5hrs) from the original time it should read
supplied_datetime = 20160711180000
The next part is that I need to correct based on the local time making sure to account for any dst times.
So lets say i'm in the UK which is UTC 0000 but we are in DST +0100, then the time that ultimately gets displayed to the user will be
supplied_datetime = 20160711190000
So the formula is supplied_datetime - (supplied_utc_offset + local_utc_offset)
This is as far as I have got before asking here.
local_utc_offset = calendar.timegm(time.localtime()) - calendar.timegm(time.gmtime(time.mktime(time.localtime())))
supplied_utc_offset = parse(programme.get('start')[:20])