Universal time is best from GPS, but I doubt phones actually take their time from that.
For local time, and working out which time zone you're in and what the daylight savings rules are:
Best would be via GSM(-like) mobile phone system, because the cell towers know precisely where they are, and reasonably well where the phones are, and the local time and daylight savings. But not all Android devices are phones with a GSM(-like) connection.
Determining timezone via GPS longitude is a bit iffy, because the time zone lines often wiggle a bit east or west to accommodate what's happening on the ground, eg avoid splitting a city into two time zones, and daylight savings varies more by political borders than by logic.
Determining timezone by IP geolocation is even worse.
Most operating systems synchronize via internet to Network Time Protocol (NTP) servers. The servers are usually super-accurate, and synchronisation is typically within a few milliseconds, depending on how fast packets travel to vs from the server.