Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Welcome to Scala version 2.10.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_51).
Type in expressions to have them evaluated.
Type :help for more information.
scala> System.getProperty("user.timezone")
res0: String = ""
scala> new java.util.Date()
res1: java.util.Date = Mon May 12 12:49:35 CEST 2014
scala> System.getProperty("user.timezone")
res2: String = Europe/Warsaw
@jrudolph

This comment has been minimized.

Copy link

@jrudolph jrudolph commented May 12, 2014

What's the value of java.util.TimeZone.getDefault?

(I once reported a stupid bug where some JDK classes internally changed the default timezone intermittently and that made concurrently running code fail in weird ways. In the end I used the jdb tool to debug a JBoss instance to find out what it was that called TimeZone.setDefault but every other debugger should work as well.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment