Rework DateTime handling in class.sqlLogDriver.php

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@fiducial.net>
Add PostgreSQL database support

Signed-off-by: Etienne CHAMPETIER <etienne.champetier@fiducial.net>