Created
July 16, 2018 06:28
-
-
Save smallsong/628e928d62671371c94dfe3be44e3c79 to your computer and use it in GitHub Desktop.
安全获取10位时间戳
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
long timeStampSec = System.currentTimeMillis()/1000; | |
String timestamp = String.format("%010d", timeStampSec); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment