sort timeseries values according to timestamp