0

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 (Java 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

1 Answer 1

6

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().

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.