python2.6 does not support timedelta.total_seconds()