How do I create a Unix timestamp on Android?

iamlukeyb picture iamlukeyb · Apr 16, 2012 · Viewed 48.2k times · Source

How do I create a Unix timestamp on Android?

I want to create a URL post request with a Unix timestamp on the end of the url.

Answer

Nesim Razon picture Nesim Razon · Apr 16, 2012
 long unixTime = System.currentTimeMillis() / 1000L;