change time to milliseconds