Last active
August 29, 2015 13:57
-
-
Save yoggy/9385774 to your computer and use it in GitHub Desktop.
convert System.currentTimeMillis() to java.utils.Date object.
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
import java.util.*; | |
void setup() { | |
long t_start = 1393640607018L; | |
long t_1130 = 1393641000000L; | |
long t_1200 = 1393642800000L; | |
long t_1230 = 1393644600000L; | |
long t_1300 = 1393646400000L; | |
long t_last = 1393656236540L; | |
println(t_start + " -> " + new Date(t_start)); | |
println(t_1130 + " -> " + new Date(t_1130)); | |
println(t_1200 + " -> " + new Date(t_1200)); | |
println(t_1230 + " -> " + new Date(t_1230)); | |
println(t_1300 + " -> " + new Date(t_1300)); | |
println(t_last + " -> " + new Date(t_last)); | |
} |
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
1393640607018 -> Sat Mar 01 11:23:27 JST 2014 | |
1393641000000 -> Sat Mar 01 11:30:00 JST 2014 | |
1393642800000 -> Sat Mar 01 12:00:00 JST 2014 | |
1393644600000 -> Sat Mar 01 12:30:00 JST 2014 | |
1393646400000 -> Sat Mar 01 13:00:00 JST 2014 | |
1393656236540 -> Sat Mar 01 15:43:56 JST 2014 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment