[android-developers] How to get current pure UTC time?

2010-08-25 Thread optimusgeek
I need to get pure UTC time in application level. It should not be changed by user or location or anything else. When I try with System.currentTimeMillis() or getTime() of Date class, they always return value of local time. If user change date or time, the return value is also changed. I found

Re: [android-developers] How to get current pure UTC time?

2010-08-25 Thread Kostya Vasilyev
The time here (at least in this piece of code) comes from calling time(NULL), which is really no better than calling new Date().getTime(). You are also confusing local time and time set by the user. Local time is UTC time corrected by the local timezone. Java uses UTC time for internal