Swiss law (Code of Obligations, art. 210) sets the deadline for claiming defects in a purchased product at two years. So far, everything sounds good. The thing that changes everything is that this deadline does not mean that you have two years to decide whether you like the product or not: it means that you have two years to discover a hidden defect that existed at the time of purchase and notify the seller immediately. If you find out and wait weeks to claim, you may lose that right.
The other point that many are unaware of is that the legal warranty covers pre-existing defects, not normal wear and tear or problems arising from use. If an appliance breaks because you've misused it, the warranty doesn't help. In addition, when you buy a second-hand product, the seller can legally reduce the warranty period to one year. What you cannot do, in business-to-consumer sales, is eliminate that term altogether, although you can try with explicit contractual clauses that appear outside the general conditions.
A distinction must also be made between the legal guarantee and the commercial guarantee offered by manufacturers or stores. The latter may be more generous than the law, but its conditions are set by the seller. In Switzerland there is no automatic right of return if a product works well but you simply do not like it: that right is not in any law, it depends on the policy of each store. Those who arrive from Spain confusing the two systems usually discover it at the returns counter, with the face of few friends and little room for manoeuvre.