On Apr 28, 7:31 am, Vincent Tsao <caojunvinc...@gmail.com> wrote:

> As you know, i can use System.currentTimeMillis() to fetch current local
> time, but how to convert local time to UTC time?

Are you sure that currentTimeMillis() gives you local time? It's
documented as "the current system time in milliseconds since January
1, 1970 00:00:00 UTC." From that description, I'd expect it to return
a raw millisecond count; there's no timezone offset involved. If
anything, it's going to be UTC, but in truth, it isn't inherently in
*any* time zone.

It all depends on what you're wanting to do with the timestamp. We
probably need more information to guide you here.

String

-- 
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

Reply via email to