made it possible to write difftimes to database too