define hash on duration

Fixes #17141