poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49138] Unit tests fail in Polish locale.
Date Tue, 20 Apr 2010 12:59:17 GMT

Yegor Kozlov <yegor@dinom.ru> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Yegor Kozlov <yegor@dinom.ru> 2010-04-20 08:59:13 EDT ---
Thanks for the patch. I applied in r935896 with minor tweaks.

(1) PackagePropertiesPart.(get|set)DateValue should work symmetrically. Your
code suggests setting time zone only in the setter, I added it in the getter

Also, the correct name of the time zone should be UTC, not GMT. The OOXML spec
Part 2 refers to the W3C Note "Date and Time Formats",
http://www.w3.org/TR/1998/NOTE-datetime-19980827 which says that Times are
expressed in UTC (Coordinated Universal Time), with a special UTC designator

(2) TestHSSFDataFormatter.testGetFormattedCellValueHSSFCell() passed in Polish
but failed in Russian locale. It turned out that the code should assert the
correct form of month (long 'MMMM' or short 'MMM') as in the original Excel

        String fmt = cell.getCellStyle().getDataFormatString();
        //assert the correct month form, as in the original Excel format
        String monthPtrn = fmt.indexOf("mmmm") != -1 ? "MMMM" : "MMM";

        // this line is intended to compute how "July" would look like in the
current locale
        String jul = new SimpleDateFormat(monthPtrn).format(new
    assertTrue( fmtval.indexOf(jul) > -1);

I ran tests for the following locales and all of them passed OK:

 -Duser.language=en -Duser.country=US
 -Duser.language=pl -Duser.country=POL
 -Duser.language=ru -Duser.country=RUS
 -Duser.language=de -Duser.country=DE


Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message