Replace %p from shortTimeFormat instead of using regexp