To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=102356
                 Issue #|102356
                 Summary|Calc assumes all date value input/output to be in budd
                        |hist era when use Thai locale
               Component|Spreadsheet
                 Version|OOo 3.1
                Platform|All
                     URL|
              OS/Version|All
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P2
            Subcomponent|code
             Assigned to|spreadsheet
             Reported by|samphan





------- Additional comments from [email protected] Fri May 29 08:57:26 
+0000 2009 -------
Symptom:-
Before OOo 3.1, regardless of user's locale setting, date value input in Calc
are always treat as AD. Date value are also always display as AD unless user
specify [~buddist] in the cell's number format.

In OOo 3.1 Calc, the behavior have been changed (unintentionally, I guess).
Tested on Windows XP/Vista and Ubuntu 8.04. If the user's locale (Regional and
Language Options on Windows or LANG on Linux) is not Thai. The behavior is the
same as before. But if the user's locale is Thai.
- date value inputs are treated as if they were in Buddhist era and convert to
AD before storing internally. Looking at the content.xml in the ODS confirm 
that.
- when date value have to be displayed, the year are converted from AD to
Buddhist era

This is regardless of OOo internal locale setting and the cell's locale. The
behavior depends on the OS user's locale only.

Problem:-
Thai people and documents use both AD and Buddhist era in dates so users may
input both, in 2-digits and 4-digits forms. Before, we teach users to always
input dates in Calc in AD so the date calculation can be performed. Even more
problematic is that Thai users may or may not set the user's locale to Thai. So
they'll see different behavior, and worse, different display of the same date on
different machines.

This problem is very serious and render Calc 3.1 unusable in Thai.

Test Case:-
- Set the user's locale to Thai. On Windows, set the Rigional and Language
Options > Formats > Current format to Thai (Thailand). On Linux set the LANG
variable to th_TH.
- start OOo 3.1 Calc, create an empty sheet
- input the following date in separate cells :-
  1/12/2552
  1/12/52        (will be incorrectly 1952 not 2552)
  1/12/2009
  1/12/09        (well be 2009)
- format all cell using DD/MM/YYYY to see all digits of the years
- you can also try set all cell to use Language=Thai 
- save as ODS file
- set the user's locale to English. On Window, set the Rigional and Language
Options > Formats > Current format to English (United States). On Linux set the
LANG variable to en_US. 
- open the ODS file, you will see the following
  01/12/2009
  01/12/1409
  01/12/1466
  01/12/1466

If you still not believe your eyes, you can change the user's locale back to
Thai and restart Calc and reopen the file, you'll get the dates as you entered 
them.

ODF Segment:-
   <table:table table:name="Sheet1" table:style-name="ta1" table:print="false">
    <table:table-column table:style-name="co1" 
table:default-cell-style-name="ce1"/>
    <table:table-row table:style-name="ro1">
     <table:table-cell office:value-type="date" office:date-value="2009-12-01">
      <text:p>01/12/2009</text:p>
     </table:table-cell>
    </table:table-row>
    <table:table-row table:style-name="ro1">
     <table:table-cell office:value-type="date" office:date-value="1409-12-10">
      <text:p>01/12/1409</text:p>
     </table:table-cell>
    </table:table-row>
    <table:table-row table:style-name="ro1">
     <table:table-cell office:value-type="date" office:date-value="1466-12-10">
      <text:p>01/12/1466</text:p>
     </table:table-cell>
    </table:table-row>
    <table:table-row table:style-name="ro1">
     <table:table-cell office:value-type="date" office:date-value="1466-12-10">
      <text:p>01/12/1466</text:p>
     </table:table-cell>
    </table:table-row>
   </table:table>

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to