Time-dependent evaporation of icy mantles in hot cores