Stratified dust grains in the interstellar medium - II. Time-dependent interstellar extinction