Solved the issue with N=1 and changed from datetime.datetime to time.time