how to get the real unix timestamp in java

When I use new Data().getTime(); with java in android, I can get the long value(13bits like 143XXXXX…XX), this value is determinded by the local time, when i change my android device local time, such as in advance or delay some hours, this value will be changed. How can I get the real unix timestamp disregard the local time and without using the network? thanks in advance!

Source: unix

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.