Incorrect synchronized time – how do iPhones know what time is it? This year my country decided we no longer needed summer saving time, and since the date when time was supposed to change to summer time, my iPhone has had the wrong time.

I have an iPhone 4. I believe newer phones don't have this problem.

My phone thinks it is summer time and is 1 hour off if I set it to synchronize automatically. I resorted to somewhat convoluted tricks to keep it synchronized correctly. If I fixed the offset time manually, Whatsapp went wrong.

How is it possible? What does it do when I set the time to synchronize automatically? I previously thought it synchornized with the phone service provider but it appears to not be the case.
The phone receives the current time in UTC from the carrier (or from NTP server) and applies current timezone adjustment based on your settings. I assume that the timezone data in your phone is probably outdated and reflects the old rules of applying DST, that's why you have 1 hour difference.