Posts Tagged ‘nexus one’

Android Phones Won’t Keep Time Precisely

Wednesday, August 17th, 2011

Google should use the GPS receiver. They should use NTP. But they trust the cell carrier.

Recently I have been in awe of what an amazing thing my Nexus One is.

For example, with few instances of a little 2×1 widget called myUTC Clock, one of my home screens turns into an 8-timezone pocket watch.  A read-in-the-dark, self-setting, 8-timezone pocket watch.

I am old enough that such a thing would once have been very expensive if possible at all.  Yet I can add it to my phone for free.

So cool.  It must be time to start complaining.

My Android Nexus One isn’t reliable about how it keeps time.  Sure, it is good enough for prosaic purposes, but it could do much better.

In the Settings I have two choices, either “Automatic Use network-provided values” or I can set it manually.

I have it set to use network-provided values.  This means to take the time from the local cellphone network.  Unfortunately, the cell provider is sometimes quite wrong.  There is a lonely roaming section of highway I drive frequently where my phone clock is off by almost two minutes.  At home, on T-Mobile in the big city, my phone clock is set within a second or so.  That seems sloppy and random and prone to wild errors if some technician makes a typo.

My other option is to manually set the time.  I did this yesterday afternoon, and this morning my phone was off by over 20-seconds.  That’s enough to start missing airplanes if not reset frequently.

There are two other options that are not available without rooting my phone and customizing the software:

1. Use time from the GPS receiver.  Yes, the GPS receiver is not always turned on, but when it is it is an exceedingly good source of time.  Pretty much “gold standard” where time still has a “gold standard”.

2. Use time from the internet.  The Network Time Protocol (NTP) works over wireless connections, uses very little data, and can set time very precisely.

In both cases, once the Linux kernel inside my Android knows the correct time it is willing to faithfully honor it to very small intervals.

Google: Please make Android keep decent time.  Possibly someone has already done this nicely and you could just pickup the code, examine it some, and make it part of the official version.

Android phones have the ability to keep excellent and time, it is just a simple matter of programming.

-kb, the Kent who has been a time geek for years, who knows that time is very complicated because of the conflicting expectations we have about time, and who still misses airplanes.

P.S.  One of the complications that Google tries to avoid by taking local phone system time is that of timezones and daylight savings/summer time.  Okay, so it is tricky, but there is detailed timezone data available for Linux, you have location data (from the GPS and, ironically, from the local phone system), the result could still have problems, but they will likely still be better than blindly trusting the local phone system.

©2011 Kent Borg