Fix a datetime bug when not using metadata