Created
June 26, 2018 12:19
-
-
Save madsunrise/178fc89ae6a0502f942caf985ba4d81a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
val cal = Calendar.getInstance() | |
cal.add(Calendar.HOUR, Random().nextInt(1000) - 500) | |
cal.add(Calendar.MINUTE, Random().nextInt(120) - 60) | |
cal.add(Calendar.SECOND, Random().nextInt(120) - 60) | |
Log.d(TAG, "Setting time: " + SimpleDateFormat("dd-MMM-yyyy HH:mm:ss").format(Date(cal.timeInMillis)) + "...") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment