BUG: fix special datetime handling