Moving time-related helper functions out of meter service into time library