Opened 13 years ago
Closed 9 years ago
#3989 closed defect (duplicate)
DBFHeader "Date of Last Update" not correct
Reported by: | michalis | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SF | Version: | svn-trunk |
Severity: | trivial | Keywords: | dbf, dbfheader, date |
Cc: |
Description
The following corrections are all part of the dbfopen.c source file, under ogr/ogrsf_frmts/shape/
DBF Header files define a "date of last update" in position 1-3. This is not currently handled correctly, as it inserts a dummy date (07/26/95) on all calls to write a new header (function DBFWriteHeader). The attached file utilizes time.h to retrieve a time_h struct to grab the current date from the system using gmtime_r().
Similarly, when updating headers, the "date of last update" header part is not handled (DBFUpdateHeader). As with the previous correction, a time_h struct initialized through gmtime_r() is used to insert the correct date in the header.
For information about the date of last update in the header, please see http://www.clicketyclick.dk/databases/xbase/format/dbf.html#DBF_STRUCT
Attachments (1)
Change History (4)
by , 13 years ago
comment:2 by , 13 years ago
comment:3 by , 9 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Duplicate of #3919. However, this ticket may have a better patch.
Updated dbfopen.c that uses time.h to correctly set dates in DBF headers.