datetime to time
Improved transactions support