Add the getTimeHashString function to the utils module

This makes it easily accessible from other core modules, such as the logging module.
Use logging in core modules