[tests] Add correctness test for reading datetime from db
[performance] Faster date conversion