Opened 12 years ago
Closed 12 years ago
#11162 closed defect (fixed)
Zip archive with wrong timestamp on non-GMT timezone
Reported by: | Jun Omae | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Milestone: | 0.12.6 |
Component: | version control/changeset view | Version: | 0.12-stable |
Severity: | normal | Keywords: | zip |
Cc: | Branch: | ||
Release Notes: |
Add "extended-timestamp" extra field for zip archive of a changeset. |
||
API Changes: | |||
Internal Changes: |
Description
Trac creates zip archive with wrong timestamp on non-GMT timezone.
The last modified time for entry in zip archive has no timezone. Trac creates the time as UTC in the archive. Also most unzip utilities extract the last modified time as localtime. As a result, the both times are different.
The issue can be solved by the "extended-timestamp" extra field which is for last modified time of the entry in unix time. Zip utility extracts correct time with the field. The field is defined in http://www.opensource.apple.com/source/zip/zip-6/unzip/unzip/proginfo/extra.fld.
Mercurial had the same issue in hg archive
. It is already fixed. See http://bz.selenic.com/show_bug.cgi?id=3600.
$ TZ=GMT-2 svn log -r9 file:///home/jun66j5/var/svn/svnrepos.dump ------------------------------------------------------------------------ r9 | Administrator | 2005-04-22 10:59:24 +0200 (Fri, 22 Apr 2005) | 1 line Now that's the fix ------------------------------------------------------------------------
$ TZ=GMT-2 unzip -l changeset_9.zip Archive: changeset_9.zip Length Date Time Name --------- ---------- ----- ---- 16 04-22-2005 08:59 branches/v1x/README.txt --------- ------- 16 1 file $ TZ=GMT-2 unzip -x changeset_9.zip -d tmp Archive: changeset_9.zip inflating: tmp/branches/v1x/README.txt $ TZ=GMT-2 ls -l --full-time tmp/branches/v1x/README.txt -rw-r--r-- 1 jun66j5 groove 16 2005-04-22 08:59:24.000000000 +0200 tmp/branches/v1x/README.txt
2005-04-22 10:59:24 +0200
(committed time) != 2005-04-22 08:59:24.000000000 +0200
(last modified time).
Attachments (0)
Change History (2)
comment:1 by , 12 years ago
Component: | general → version control/changeset view |
---|---|
Owner: | set to |
Status: | new → assigned |
comment:2 by , 12 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Committed in [11811-11813].
After log:jomae.git:ticket11162/0.12 and log:jomae.git:ticket11162/1.0, unzip utility extracts correct times.
log:jomae.git:ticket11162/0.12
log:jomae.git:ticket11162/1.0