Pass db and time via controctor.