I've got a wierd problem that I am at a loss to explain. Perhaps some of you IDEA experts can explain what's going on.
I've got a bunch of time utility classes with JUnit tests defined for each class. I have a JUnit run configuration that uses the "All in package" mechanism to run all my unit tests. When I run that configuration, I get a unit test failing because of code that uses the default timezone (i.e. no Locale arg passed to SimpleDateFormat) when the test expects central time zone. No problem, I can fix that code.
Here's the wierd part: When I select the individual test class that fails and run it "standalone" using a single class JUnit run configuration, the test passes. I added a couple of logging statements, and sure enough I'm getting a different default timezone depending on how I run.
To test this, I have the following code:
When I run in the "All in package" mode, the console gets the following:
When I run in the single test class mode, the console instead shows:
Can anyone explain why I see a different default timezone here?