Fixed error in from_timerange
Added quick test for from_timerange