Or you can do something like this... Date d = new Date(); d.getTime();
I personally prefer this but only because I have access to other functions for outputing the time in a human readable form without having to write a bunch of extra code. 2009/6/9 Mike Lanin <mike.la...@gmail.com> > > Thanks! I'll just use currentTimeMillis(). > > On 9 июн, 16:01, Mark Murphy <mmur...@commonsware.com> wrote: > > Jeff Sharkey wrote: > > > So just a heads up that Android uses NITZ events provided by a carrier > > > to properly set the system date and time. Android also falls-back to > > > network NTP automatically when no cellular network is available. > > > > >http://en.wikipedia.org/wiki/NITZ > > > > > The time provided by currentTimeMillis() will typically be the best > > > available time, and it's what all of the services on the device use, > > > like Calendar and Alarm Clock. > > > > Does Android fall back to NTP when there is cellular but no NITZ? NITZ > > isn't terribly widespread. > > > > Thanks! > > > > -- > > Mark Murphy (a Commons Guy)http://commonsware.com| > http://twitter.com/commonsguy > > > > Need help for your Android OSS project?http://wiki.andmob.org/hado > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---