fix the datetime call