Now the question is - how would the iPhone even know that's in Japan? :) GPS? I think OS X uses the time zone for these things, e.g. to block certain WiFi channels due to legal requirements.
Well, it is a phone... It's going to have access to geo data from the local cell phone towers, no timezone hacks necessary. In fact I believe the iPhone adjusts your active timezone automatically according to the geo data collected from the local cell tower, hence why your phone time changes when you touch down after a long flight.
Actually the time update is not based on inference from location data, but rather it is actively transmitted by the cell network as part of the GSM standard.
Though it's possibly worth pointing out that time/date is not a _requirement_ to the standard and not all networks implement it. It's possibly also worth pointing out that most recent Android devices seem to use NTP at the OS level rather than relying on GSM broadcast info.
As the other poster said, time has it's own standard. In terms of your reply to OP, it's even simpler. The network identifier for an operator broadcast by the cell tower consists of a network code and a country code :)
Maybe it is also transmitted that way, but changing the time zone from Australia from New Guinea has repeatedly fixed my OS X WiFi issues when a Chinese roommate used an illegal channel (in Australia).
It will be connected to a telco network, right? That's how it knows in what country it is. In Europe it is quite common to cross countries borders and as soon as you get connected to your neighbours telco you get a text welcoming you to the country.