Gmane
Favicon
From: Adam Feuer <adamf@...>
Subject: test failure when running on Ubuntu 8.04 caused by timezone incompatibility
Newsgroups: gmane.comp.finance.mifos.devel
Date: 2008-05-13 22:16:42 GMT (1 year, 7 weeks, 2 days, 5 hours and 56 minutes ago)

I recently tried to build and test the mifos 1.1 trunk on a recent Ubuntu Linux machine, Hardy Heron 8.04. I had a problem with the timezone, here is how I resolved it.

Symptom:
DateUtilsTest.testParseBrowserDateFields failed, along with other
tests in this file.

Cause:
Ubuntu 8.04 appears to use SystemV-style time zones; in
other words, SystemV/PST8PDT instead of US/Pacific.

Java 1.5 has a bug that does not recognize SystemV timezones correctly
in all cases:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6456628

This means the Java system property user.timezone is not set
correctly.

How to fix:

Do one of these:

* set the TZ environment variable to a non-SystemV timezone
(US/Pacific or whatever your timezone is)

  $ export TZ=US/Pacific

* link the /etc/localtime to the correct timezone file under
  /usr/share/zoneinfo

  $ sudo ln -sf /usr/share/zoneinfo/US/Pacific /etc/localtime

cheers
adam
--
Adam Feuer <adamf at pobox dot com>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/