user234932
user234932

Reputation:

How to interpret ZipInfo.date_time value

The documentation on ZipInfo objects wasn't really helpful regarding this. What is this date_time value? Is it UTC or local machine time?

Upvotes: 5

Views: 1018

Answers (1)

user234932
user234932

Reputation:

Ok, I guess I just found my answer here:

Inside zip files, dates and times are stored in local time in 16 bits, not UTC (Coordinated Universal Time/Temps Universel Coordonné) as is conventional, using an ancient MS DOS format. Bit 0 is the least signifiant bit. The format is little-endian. There was not room in 16 bit to accurately represent time even to the second, so the seconds field contains the seconds divided by two, giving accuracy only to the even second.

Upvotes: 5

Related Questions