# Decoding a zip file and report the specs

**URL:** <https://forum.xojo.com/t/decoding-a-zip-file-and-report-the-specs/88964>\
**Category:** General\
**Created:** [October 5, 2026, 2:17pm UTC](https://forum.xojo.com/t/decoding-a-zip-file-and-report-the-specs/88964 "2026-10-05T14:17:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [October 5, 2026, 2:17pm UTC](https://forum.xojo.com/t/decoding-a-zip-file-and-report-the-specs/88964/1 "2026-10-05T14:17:31Z")

</div>

I was going to [en.wikipedia.org](https://en.wikipedia.org/wiki/ZIP_(file_format)) to get the contents of a zip file and decoded the top of the files as:

 ![image](https://forum.xojo.com/uploads/default/original/3X/b/5/b5c574b684c278da0085416904e93688eaf363c7.jpeg)

and I get a problem: nowhere is the desction of the fields:  
File last modification time  
File last modification date

And so I let (for the moment) the number found there.

A seach using “File last modification” in the wikipedia file returns only these two descriptions.

The question is: how can I decode the returned values to get the real date and time ?

Ideas ?

In the mean time, I will create some texts files with only some words in them, create a zip from these files and try reverse engineering (in case I am able to understand what I get, reading the zip as above AND with a Hex Dump application.

TIA

BTW: the “Comicinfo.xml” file was (usually) added after the orogonal zip creator… creates it. But I do not know why this person do that (besde the obvious advertising (reading the file, this become obvious, more obvious when you have the chance to get the original zip file…).

---

<div class="post-metadata">

**Author:** ![Andrew\_Lambert](https://forum.xojo.com/user_avatar/forum.xojo.com/andrew_lambert/32/215_2.png) [@Andrew\_Lambert](https://forum.xojo.com/u/Andrew_Lambert)\
**Post date:** [October 5, 2026, 6:10pm UTC](https://forum.xojo.com/t/decoding-a-zip-file-and-report-the-specs/88964/2 "2026-10-05T18:10:56Z")

</div>

Zip timestamps are stored in the ancient MS-DOS format. Here’s a method that takes the two UInt16’s of the timestamp and converts them into a Xojo `DateTime` object.

```auto
Function ConvertDate(Dt As UInt16, tm As UInt16) As DateTime
  ' Convert the passed MS-DOS style date and time into a DateTime object.
  ' The DOS format has a resolution of two seconds, no concept of time zones,
  ' and is valid for dates between 1/1/1980 and 12/31/2107
  
  Dim h, m, s, dom, mon, year As Integer
  h = ShiftRight(tm, 11)
  m = ShiftRight(tm, 5) And &h3F
  s = (tm And &h1F) * 2
  dom = dt And &h1F
  mon = ShiftRight(dt, 5) And &h0F
  year = (ShiftRight(dt, 9) And &h7F) + 1980
  
  Return New DateTime(year, mon, dom, h, m, s)
End Function

```

---

<div class="post-metadata">

**Author:** ![Stefan\_von\_Allmen](https://forum.xojo.com/letter_avatar_proxy/v4/letter/s/e5b9ba/32.png) [@Stefan\_von\_Allmen](https://forum.xojo.com/u/Stefan_von_Allmen)\
**Post date:** [October 5, 2026, 6:58pm UTC](https://forum.xojo.com/t/decoding-a-zip-file-and-report-the-specs/88964/3 "2026-10-05T18:58:58Z")

</div>

If you need more details about zip files - PKWARE, the inventor and maintainer of the file format, maintains a specification document named APPNOTE.TXT. Enter those two names into your preferred search engine to find it.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [October 5, 2026, 7:08pm UTC](https://forum.xojo.com/t/decoding-a-zip-file-and-report-the-specs/88964/4 "2026-10-05T19:08:00Z")

</div>

Andrew, Stefan: THANK YOU. I will follow your advices by tomorrox (I slept the whole afternoon and need some more rest.

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [October 6, 2026, 6:57am UTC](https://forum.xojo.com/t/decoding-a-zip-file-and-report-the-specs/88964/5 "2026-10-06T06:57:08Z")

</div>

Here:

[ZIP File Format (APPNOTE.TXT)](https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT)
