print date time
factorize code as lib