Something has changed, 了 at the end

了 at the end of a sentence says a situation is new, 下雨了 and 我不去了, and with a length of time 了…了 says how long something has gone on until now, 我学了三年了.

From Chinese 2.