Fix deprecation messages caused by recent changes to Duration.