Skip to content

Instantly share code, notes, and snippets.

@propensive
Created May 12, 2014 10:51
Show Gist options
  • Save propensive/9fbdbbd978237b0c8711 to your computer and use it in GitHub Desktop.
Save propensive/9fbdbbd978237b0c8711 to your computer and use it in GitHub Desktop.
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
Copy link

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