Bug 172305 - Dates become 1/1/70 using OpenOffice Base files with gcj
Summary: Dates become 1/1/70 using OpenOffice Base files with gcj
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: hsqldb
Version: 4
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Archit Shah
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-11-02 16:01 UTC by Garrett Mitchener
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-02-22 20:17:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Database with a table containing a date field. (7.69 KB, application/vnd.oasis.opendocument.database)
2005-11-02 16:05 UTC, Garrett Mitchener
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 24860 0 None None None Never

Description Garrett Mitchener 2005-11-02 16:01:33 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7

Description of problem:
When I create a database in a file with a date field in ooo base, the date turns into 1/1/70 as soon as the record is stored.  This happens whether I enter the date in a form or in a table.  The problem seems to be related to gcj, because I switched to Sun's java and restarted ooo base, and then the dates work fine.  If I switch back to gcj, the dates all display as 1/1/70 again.

Version-Release number of selected component (if applicable):
openoffice.org-core-1.9.125-1.1.0.fc4, libgcj-4.0.1-4.fc4

How reproducible:
Always

Steps to Reproduce:
Start open office.

Go to Tools, Options, Java, and set it to gcj.

Restart open office.

Create a new database.

Create a table with a date field.

Try to edit the date.

Actual Results:  Dates turn into 1/1/70 as soon as you move to the next record.

Expected Results:  It should save the date as entered.

Additional info:

Comment 1 Garrett Mitchener 2005-11-02 16:03:19 UTC
Oh, I get this behavior from the 1.9.125 packages.  The dates also malfunction
in the new 2.0.0-3.2.1 packages.  Annoyingly, the 2.0.0 packages only let you
use gcj, so I don't know if switching to sun's java fixes the problem.

Comment 2 Garrett Mitchener 2005-11-02 16:05:34 UTC
Created attachment 120644 [details]
Database with a table containing a date field.

Here's a file that illustrates the problem.  Open it in ooo base: If you use
gcj, all the dates will turn into 1/1/70 and you can't change them.  If you use
sun's java, the last date should be different (because I switched to sun's java
and entered it) and you can change the dates.

Comment 3 Archit Shah 2005-11-07 20:11:56 UTC
This bug affects both Date and Time columns, but not Timestamp.

Comment 4 Archit Shah 2005-11-14 20:20:12 UTC
The problem is in the java.util.Calendar implementation in libgcj. The 4.0.x
branch of libgcj has a fix and the trunk should get one (see the related GCC
bug). Depending on what versions ship when, one of these will make it into the
rawhide GCC. The workaround until then is to use Timestamp columns.


Note You need to log in before you can comment on or make changes to this bug.