~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_export.py

  • Committer: Jelmer Vernooij
  • Date: 2011-03-14 23:18:48 UTC
  • mto: This revision was merged to the branch mainline in revision 5724.
  • Revision ID: jelmer@samba.org-20110314231848-1lckp5aeoeobuiq3
Work around zip info time zone issues.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import stat
24
24
import sys
25
25
import tarfile
 
26
import time
26
27
import zipfile
27
28
 
28
29
 
353
354
        self.build_tree_contents([('branch/har', 'foo')])
354
355
        tree.add('har')
355
356
        # Earliest allowable date on FAT32 filesystems is 1980-01-01
356
 
        tree.commit('setup', timestamp=315532800)
 
357
        timestamp = 347151600
 
358
        tree.commit('setup', timestamp=timestamp)
357
359
        self.run_bzr('export --per-file-timestamps test.zip branch')
358
360
        zfile = zipfile.ZipFile('test.zip')
359
361
        info = zfile.getinfo("test/har")
360
 
        self.assertEquals((1980, 1, 1, 1, 0, 0), info.date_time)
 
362
        self.assertEquals(time.localtime(timestamp)[:6], info.date_time)