blob: c5e82166fd880c3f7617efeb6cbf7d01338ec4a3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
//jvm/src/main/scala/simple/Platform.scala
package simple
import java.text.SimpleDateFormat
import java.util.{TimeZone, Locale}
object Platform{
def format(ts: Long) = {
val fmt = new SimpleDateFormat(
"yyyy-MM-dd'T'HH:mm:ss.sss'Z'"
)
fmt.setTimeZone(TimeZone.getTimeZone("UTC"))
fmt.format(new java.util.Date(ts))
}
def main(args: Array[String]) = {
val times = Seq(
0L,
1L << 32
)
println("Running on JVM! " + 1.0d)
println(Simple.formatTimes(times))
}
}
|