Is this difference due to a system setting or is it due to the a code difference?
OpenJDK Version:
Welcome to Scala version 2.8.1.final (OpenJDK Client VM, Java 1.6.0_20).
scala> new java.sql.Timestamp(1292141899648L)
res0: java.sql.Timestamp = 2010-12-12 08:18:19.648
Sun Java Version:
Welcome to Scala version 2.8.1.final (Ja开发者_StackOverflowva HotSpot(TM) 64-Bit Server VM, Java 1.6.0_24).
scala> new java.sql.Timestamp(1292141899648L)
res0: java.sql.Timestamp = 2010-12-12 00:18:19.648
Looks like a difference in default timezone settings, so that timestamp is the same, but its representations in output are different. Check results of TimeZone.getDefault()
.
精彩评论