seems there is a bug here, sometimes from_time.replace raise ValueError, let's assert here to see what's wrong