fix datetime conversion for logs