Remove unneeded datetime convert

prevent usage of function .fromtimestamp that can throw exceptions on some platforms

replace datetime calls with sbdatetime calls