use javascript to format time in browser time