- measuredat = list(parsedate(current['observation_time_rfc822']))
- measuredat[6] = _dayofweek(current['observation_time_rfc822'][0:3])
- measuredatTZ = current['local_tz_short']
+ try:
+ measuredat = list(parsedate(current['observation_time_rfc822'])) # we have to turn this into a list so that we can assign to it.
+ measuredat[6] = _dayofweek(current['observation_time_rfc822'][0:3])
+ measuredatTZ = current['local_tz_short']
+ except:
+ measuredat = time.gmtime()
+ measuredatTZ = '(actual time unknown)'