Hi,

 I changed the time & date of the device..

 Then i launched an app which reads time & date using location.getTime
Api as follows---

long time =loc.getTime();
GregorianCalendar gcal = new
GregorianCalendar(TimeZone.getTimeZone("UTC"));
gcal.setTimeInMillis(time);

Log.i("Ashiq", "day======"+gcal.get(GregorianCalendar.DAY_OF_MONTH));
                                        Log.i("", 
"month======"+gcal.get(GregorianCalendar.MONTH));
                                        Log.i("", 
"yearc======"+gcal.get(GregorianCalendar.YEAR));
                                        Log.i("", 
"hrs======"+gcal.get(GregorianCalendar.HOUR));
                                        Log.i("", 
"minsc======"+gcal.get(GregorianCalendar.MINUTE));


But above API returns me time & date as per the device time..

Actually it should return the correct time(sataellite or cell tower
based) independent of the device time & date.

Thanks & Regards,
Ashiq Sayyad


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to