support localtime in logging.