Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 Android 上创建 Unix 时间戳?
我想在 URL 的末尾创建一个带有 Unix 时间戳的 URL 发布请求。
long unixTime = System.currentTimeMillis() / 1000L;
这很简单:
long timestamp = Calendar.getInstance().getTime() / 1000;
long timeStamp = Calender.getInstance().getTime() / 1000L ;