added a system clock to allow overriding of database timestamps