Bug fix and fine tuning

Fixed the bug where time received from DB is always 00:00:00
Adjusted the DB pull time from 2sec to 5 sec.