fix code style and throw error on unsupported timestamp