View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000677 | file | General | public | 2025-08-06 18:22 | 2025-08-06 18:22 |
Reporter | jsummers | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 5.46 | ||||
Summary | 0000677: ARJ timestamps could be improved | ||||
Description | In the ARJ pattern, I see no reason that the commented-out "lemsdosdate" stuff isn't in production yet. The attached proposed patch does the following: * Uses the msdosdate/time types, to improve formatting of the archive-creation time. E.g., "Sep 15 1995 09:47:28" instead of "15 sep 1980+15". * Deletes the now-unused "dos-date" named pattern. * Also prints the archive-last-modified time, if it exists in the relevant format version. | ||||
Tags | No tags attached. | ||||
|
arjtimestamps.patch (2,982 bytes)
diff --git a/magic/Magdir/archive b/magic/Magdir/archive index 8be29a36..aebaca5f 100644 --- a/magic/Magdir/archive +++ b/magic/Magdir/archive @@ -1499,22 +1499,18 @@ >>9 ubyte !2 \b, security version %u # file type; 2 in main header; 0~binary 1~7-bitText 2~comment 3~directory 4~VolumeLabel 5=ChapterLabel >0xA ubyte !2 \b, file type %u -# date+time when original archive was created in MS-DOS format via ./msdos ->0xC ulelong x \b, created ->0xC use dos-date -# or date and time by new internal function -#>0xE lemsdosdate x %s -#>0xC lemsdostime x %s +# date+time when original archive was created in MS-DOS format +>0xE lemsdosdate x \b, created %s +>0xC lemsdostime x %s +# Archive mod time, added in format v6 (ARJ 2.39c) +>5 ubyte >5 +>>0x10 ulelong >0 \b, modified +>>>0x12 lemsdosdate x %s +>>>0x10 lemsdostime x %s + # FOR DEBUGGING #>0x12 uleshort x RAW DATE %#4.4x #>0x10 uleshort x RAW TIME %#4.4x -# date+time when archive was last modified; sometimes nil or -# maybe wrong like in HP4DRVR.ARJ -#>0x10 ulelong >0 \b, modified -#>>0x10 use dos-date -# or date and time by new internal function -#>>0x12 lemsdosdate x %s -#>>0x10 lemsdostime x %s # archive size (currently used only for secured archives); MAYBE? #>0x14 ulelong !0 \b, file size %u # security envelope file position; MAYBE? diff --git a/magic/Magdir/msdos b/magic/Magdir/msdos index b2d9e973..eb062d52 100644 --- a/magic/Magdir/msdos +++ b/magic/Magdir/msdos @@ -2822,40 +2822,6 @@ # NB: The BACKUP.nnn files consist of the files backed up, # concatenated. -# From: Joerg Jenderek -# URL: http://fileformats.archiveteam.org/wiki/MS-DOS_date/time -# Reference: https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-dosdatetimetofiletime -# Note: DOS date+time format is different from formats such as Unix epoch -# bit encoded; uses year values relative to 1980 and 2 second precision -0 name dos-date -# HHHHHMMMMMMSSSSS bit encoded Hour (0-23) Minute (0-59) SecondPart (*2) -#>0 uleshort x RAW TIME [%#4.4x] -# hour part -#>0 uleshort/2048 x hour [%u] -# YYYYYMMMMDDDDD bit encoded YearPart (+1980) Month (1-12) Day (1-31) -#>2 uleshort x RAW DATE [%#4.4x] -# day part ->2 uleshort&0x001F x %u -#>2 uleshort/16 x MONTH PART [%#x] -# GRR: not working -#>2 uleshort/16 &0x000F MONTH [%u] -#>2 uleshort&0x01E0 x MONTH PART [%#4.4x] ->2 uleshort&0x01E0 =0x0020 jan ->2 uleshort&0x01E0 =0x0040 feb ->2 uleshort&0x01E0 =0x0060 mar ->2 uleshort&0x01E0 =0x0080 apr ->2 uleshort&0x01E0 =0x00A0 may ->2 uleshort&0x01E0 =0x00C0 jun ->2 uleshort&0x01E0 =0x00E0 jul ->2 uleshort&0x01E0 =0x0100 aug ->2 uleshort&0x01E0 =0x0120 sep ->2 uleshort&0x01E0 =0x0140 oct ->2 uleshort&0x01E0 =0x0160 nov ->2 uleshort&0x01E0 =0x0180 dec -# year part ->2 uleshort/512 x 1980+%u -# - # ExcelBIFF2-8BOF.magic - Excel Binary Interchange File Format versions 2-8 # Beginning of File records # See https://www.gaia-gis.it/gaia-sins/freexl-1.0.6-doxy-doc/html/Format.html |