This fixes issue 5797 and allows replace using timestamps. 

this fixes https://github.com/pydata/pandas/issues/5797