looking for an advise. Everyday I scan the SalesForce to find new opportunities and update the data accordingly. I am looking for a library or method that will store the last_scan_day and create a timestamp afterwards. So that the next day when the code scans for new opportunities it knows what the last_scan_day was - only checks the data that is Date > last_scan_day and updates the timestamp with a new date. And so on. It is a very high level of what I am trying to do, but if anyone can direct me to the right python methods, that would be awesome.
Currently, this works for me in php, but I need to translate it to Python.
$last_run_date = file_get_contents("./last_scan_date.txt");
$last_run_date = str_replace("\n","",$last_run_date);
$t = getDatetimeNow();
$t = substr($t,0,19)."Z";
file_put_contents("./last_scan_date.txt",$t);