Bug 143715 - FILEOPEN DBF timestamp fields (type '@') trigger corruption error
Summary: FILEOPEN DBF timestamp fields (type '@') trigger corruption error
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 143716 (view as bug list)
Depends on:
Blocks: Format-Filters
  Show dependency treegraph
 
Reported: 2021-08-04 05:10 UTC by SheetJS
Modified: 2025-05-13 03:11 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SheetJS 2021-08-04 05:10:24 UTC
Description:
dBASE Level 7 DBF supports the timestamp field (type '@').  Valid DBF files generated from dBASE are flagged as corrupt and LibreOffice fails to repair them

Steps to Reproduce:
1. Download sample file https://github.com/SheetJS/test_files/raw/master/dbf/d11.dbf
2. open in LibreOffice


Actual Results:
Error message "The file 'd11.dbf' is corrupt and therefore cannot be opened. LibreOffice can try to repair the file."

Attempting to repair the file yields a new error message "The file 'd11.dbf' could not be repaired and therefore cannot be opened."

Expected Results:
The file opens properly and the field is interpreted as Date


Reproducible: Always


User Profile Reset: Yes



Additional Info:
SheetJS currently uses the following algorithm to extract values.  The algorithm agrees with dBASE 2019 on the values in the test file:

- Parse the 8 bytes of the field as an IEEE754 double in big-endian order
- Subtract 0x388317533400 (62135683200000, a number that can be exactly represented in a IEEE754 double)
- Interpret the code as milliseconds since January 1 1970 (which is what JS uses as the 0 value for the native Date object)
Comment 1 Julien Nabet 2021-08-04 08:25:01 UTC
*** Bug 143716 has been marked as a duplicate of this bug. ***
Comment 2 raal 2021-08-07 20:13:58 UTC
repro Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: 36efb384a66b6dd645e0ae80fd7df68370a9dc8b
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 3 Alex Thurgood 2021-08-11 13:20:47 UTC
I seem to recall that our DBF filter only supports a much older level of DBF (III/IV ?)

I'm not aware of any major work within the LO project that might have gone into bringing this filter up to date.
Comment 4 QA Administrators 2025-05-13 03:11:20 UTC
Dear SheetJS,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug