Move graphite time conversion functions to service.