View Single Post
Old 05-30-2011, 12:02 PM   #43
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,636
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Quote:
Originally Posted by kovidgoyal View Post
The innocence of youth. They just assume the time is in whatever the local timezone of the machine running the extractor is.
Haha. Well I guess I don't know what the downside of doing that is. Since we are not actually "using" the date/times extracted, we just want them to have the same value when put back into the zip file as they have when extracted.

Bearing in mind my complete ignorance on such dates and times, I tried adding these two lines to zipfile.py at line 1126:
Code:
                mtime = time.mktime(member.date_time + (0,0,0))
                os.utime(targetpath, (mtime, mtime))
This gets me "close", but every time I zip the file back up the hour increments by one. Or is that just an example of the timezone issue?
kiwidude is offline   Reply With Quote