Monthly Archives: March 2012
I noticed my iPhone said Cupertino for it’s timezone setting. I live in Phoenix, AZ, where there is no observance to DST at all unless you are on some some tribal land which they do. That’s another story.
So how does this happen I wonder? With a non-jailbroken phone you can perform lots of tests like I did. Or you can get AppSwitch by XCool Apps for $1.99. This app can view the console and you can see some of the realtime settings being applied behind the scenes. That would sum up some up most of this, but that wasn’t as much fun as doing what I did below. Of course you gotta be real bored.
My method was very similar. I used a free Cydia app called syslogd to “/var/log/syslog”, and SSH.
First login to your phone’s IOS using the root user. Always change your password from the default password that apple had set, which is alpine. Once logged in, type date and enter. That should echo back what you have your phone set for. Depending on your settings it could be a number of time zone settings.
The location where the phone gets it’s timezone info is from a symbolic link called “localtime”residing in /var/db/timezone. For me, being in Phoenix, my phone fetches the Los Angeles file, which is aliased out from /usr/share/zoneinfo/America/Los_Angeles.
While I was in there sure enough there is a file called Phoenix, why won’t it use it?! Hmmm. Ok, so what I did next was manually rename the existing symbolic link “mv localtime localtime.old”. But first set the folder permission to this path to “chmod 777 /var/db/timezone” Next I setup a new symbolic link to Phoenix, “ln -s /usr/share/zoneinfo/America/Phoenix ./localtime”
Nope, still reporting Cupertino when set to auto. Next I renamed the LA file “mv Los_Angeles Los_Angeles_old” and then ran the date command, now it is set to UTC and 7 hours ahead of where I was when I was set to Phoenix manual. Ok I get it, that makes sense in away. Notice the red text below. That means the phone isn’t finding the file link now.
So if you put back the LA file, it’ll go to PDT and the clock will be the same as Phoenix. If you set timezone to manual and to Phoenix, then date shows MST.
Ok, back to syslogging the console. Did I already mention you have to be real bored to do this? Once you install it you have to reboot the phone. Then console back in using SSH, and type “tail -f /var/log/syslog”
Here ya go, I set it to Detroit and then back to auto, the process is in the red square below. So it does call on GPS at some point, which makes sense. You see it kicks off timed, and eventually sets the clock via NITZ, or Network Identity and Time Zone. NITZ is used by Apple and also by AT&T. It follows along with the GSM standard, so this will work since iPhone 2G. What you don’t see here is the console doesn’t report the carrier info, whether or not it’ll grab time via NITZ under AT&T if all else fails. I am assuming it would.
I also attempted prior to this setting to off the location services/system services/setting time zone to “off”. Nothing will budge Cupertino.
How about I put the whole phone in airplane mode? Same thing, it’ll set the auto to Cupertino. Fascinating. Cupertino is here to stay, it’s the default setting when nothing works. I could had saved a few hours of my time just knowing this. I guess I was truely bored.