add an interface for the timefactory class

fix indention
Merge pull request #12982 from owncloud/timefac-iface

Add an interface for the timefactory class