Fix erroneous cast
Fix index bug
Actually read time & date values