[tests] Add correctness test for reading datetime from db