http://europa.eu/youreurope/citizens/consumers/shopping/guar...
"The legal guarantee is valid for a period of two years throughout the EU. But there are certain conditions. [...] Any fault that appears within six months will be presumed to have existed at the time of delivery. The seller must then repair or replace your phone free of charge - or reimburse you if repairs or replacement are impossible. [...] After six months, you can still hold the seller responsible for any defects during the full two-year guarantee period. However, if the seller contests this, you must be able to prove that the defect existed at the time of delivery. This is often difficult, and you will probably have to involve a technical expert."
Because of the burden-of-proof condition it's basically only a 6 months guarantee instead of 2 years. Countries may improve these conditions and I think some countries like the UK actually do.
This guarantee also has nothing to do with the producer, the seller has to provide this guarantee, which can be a hassle if the seller is not easily accessible.