Found handleEndOfInit() and looked thru the code, and unless I'm mistaken (likely, I'm new at this) this code is for the emulator. I think I'm guilty of being overly succinct in my questions and not providing highly relevant information.
I'm running Android 1.6 on real hardware, a Beagleboard, connected to a real cell modem, a Telit GE865, registered on an AT&T network. The network returns the full date/time/timezone/dst in an appropriate format. This is passed to the GsmStateTracker which sets the system time/date. The StateTracker seems to assume the time arrives in UTC (by instantiating the Calendar object with a "GMT" timezone) and thus the timezone gets added to the time. However, AT&T sends local time with the timezone already applied, and with the tz field = -6 (central time zone). So I wind up with a time -6 hours from where it ought to be. I hacked this by instantiating the Calendar object with "US/Central" and that worked. But in general, how is one supposed to tell if an operator is sending local time or UTC? I would have thought this would be standardized. Thanks, Mike On Sat, Mar 6, 2010 at 9:24 PM, David Turner <[email protected]> wrote: > The Android code only assumes UTC, except that you can use a small > extension to the NITZ string to encode the timezone too. > See the comment and implementation in handleOfInit() in > external/qemu/telephony/android_modem.c here: > > > http://android.git.kernel.org/?p=platform/external/qemu.git;a=blob;f=telephony/android_modem.c;h=6e73411d9fdd706b8f369684c03451e6e8d7221a;hb=master > > On Fri, Mar 5, 2010 at 2:47 PM, ms12 <[email protected]> wrote: > >> Ok, got that to work, thanks. >> Discovered that the time comes back in local time zone, not UTC. >> Android code assumes UTC. The timezone comes with it of course, but >> if you don't know if it has already been applied, I would think it >> difficult to determine in the code. Is there a standard for this? >> Mike >> >> >> On Mar 3, 5:22 pm, David Turner <[email protected]> wrote: >> > Yes, you can use a NITZ unsolicited message. See >> > hardware/ril/reference-ril/reference-ril.c:onUnsolicited() >> > >> > On Wed, Mar 3, 2010 at 2:25 PM, ms12 <[email protected]> wrote: >> > > Is there a way to set the system time from the cell phone? I've >> > > searched ril.h and ril_commands.h and there seems to be no way to >> > > request the time from the cell modem. Am I missing something? >> > >> > > Mike >> > >> > > -- >> > > unsubscribe: >> > > [email protected]<android-porting%[email protected]> >> <android-porting%[email protected]<android-porting%[email protected]> >> > >> >> > > website:http://groups.google.com/group/android-porting >> > >> > >> >> -- >> unsubscribe: >> [email protected]<android-porting%[email protected]> >> website: http://groups.google.com/group/android-porting >> > > -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting
