Update time for javascript chart