sort data points and store times in dygraphs datestring format