misc minor fix up

undefined hook_dir
undefined DATE_TIME_TAG_FORMAT
Redefining built-in 'format'

Change-Id: I86e1c078a9b621ef7bd712ae903082730df36b11