Acceleration times of particles responsible for the gamma-rays in supernova remnants (SNRs) are comparable with SNR age. If the number of particles starting acceleration was varying during early times after the supernova explosion then this variation should be reflected in the shape of the gamma-ray spectrum. In order to analyse this effect, we consider the time variation of the radio spectral index in SN1987A and solution of the non-stationary equation for particle acceleration. We reconstruct evolution of the particle injection in SN1987A, apply it to derive the particle momentum distribution in IC443 and model its gamma-ray spectrum. We show that: i) observed break in the proton spectrum around 50 GeV in IC443 is a consequence of the variation of the cosmic ray injection; ii) shape of the hadronic gamma-ray spectrum in SNRs critically depends on the temporal variation of the cosmic ray injection in the immediate post explosion phases.