Reformat rails time to match js time