713
713
self.assertEqual(
714
714
'Sat 2009-10-10 08:00:00 +0100',
715
715
osutils.format_date(last_rev.timestamp, last_rev.timezone))
717
def test_commit_time_negative_windows(self):
718
tree = self.make_branch_and_tree('tree')
719
self.build_tree(['tree/hello.txt'])
720
tree.add('hello.txt')
721
out, err = self.run_bzr("commit -m hello "
722
"--commit-time='1969-10-10 00:00:00 +0000' tree/hello.txt")
723
last_rev = tree.branch.repository.get_revision(tree.last_revision())
725
'Fri 1969-10-10 00:00:00 +0000',
726
osutils.format_date(last_rev.timestamp, last_rev.timezone))
728
def test_commit_time_negative_32bit(self):
729
tree = self.make_branch_and_tree('tree')
730
self.build_tree(['tree/hello.txt'])
731
tree.add('hello.txt')
732
out, err = self.run_bzr("commit -m hello "
733
"--commit-time='1900-01-01 00:00:00 +0000' tree/hello.txt")
734
last_rev = tree.branch.repository.get_revision(tree.last_revision())
736
'Mon 1900-01-01 00:00:00 +0000',
737
osutils.format_date(last_rev.timestamp, last_rev.timezone))
739
def test_commit_time_positive_32bit(self):
740
tree = self.make_branch_and_tree('tree')
741
self.build_tree(['tree/hello.txt'])
742
tree.add('hello.txt')
743
out, err = self.run_bzr("commit -m hello "
744
"--commit-time='2039-01-01 00:00:00 +0000' tree/hello.txt")
745
last_rev = tree.branch.repository.get_revision(tree.last_revision())
747
'Sat 2039-01-01 00:00:00 +0000',
748
osutils.format_date(last_rev.timestamp, last_rev.timezone))
717
750
def test_commit_time_bad_time(self):
718
751
tree = self.make_branch_and_tree('tree')
719
752
self.build_tree(['tree/hello.txt'])