726
726
self.assertEqual(
727
727
'Sat 2009-10-10 08:00:00 +0100',
728
728
osutils.format_date(last_rev.timestamp, last_rev.timezone))
730
def test_commit_time_negative_windows(self):
731
tree = self.make_branch_and_tree('tree')
732
self.build_tree(['tree/hello.txt'])
733
tree.add('hello.txt')
734
out, err = self.run_bzr("commit -m hello "
735
"--commit-time='1969-10-10 00:00:00 +0000' tree/hello.txt")
736
last_rev = tree.branch.repository.get_revision(tree.last_revision())
738
'Fri 1969-10-10 00:00:00 +0000',
739
osutils.format_date(last_rev.timestamp, last_rev.timezone))
741
def test_commit_time_negative_32bit(self):
742
tree = self.make_branch_and_tree('tree')
743
self.build_tree(['tree/hello.txt'])
744
tree.add('hello.txt')
745
out, err = self.run_bzr("commit -m hello "
746
"--commit-time='1900-01-01 00:00:00 +0000' tree/hello.txt")
747
last_rev = tree.branch.repository.get_revision(tree.last_revision())
749
'Mon 1900-01-01 00:00:00 +0000',
750
osutils.format_date(last_rev.timestamp, last_rev.timezone))
752
def test_commit_time_positive_32bit(self):
753
tree = self.make_branch_and_tree('tree')
754
self.build_tree(['tree/hello.txt'])
755
tree.add('hello.txt')
756
out, err = self.run_bzr("commit -m hello "
757
"--commit-time='2039-01-01 00:00:00 +0000' tree/hello.txt")
758
last_rev = tree.branch.repository.get_revision(tree.last_revision())
760
'Sat 2039-01-01 00:00:00 +0000',
761
osutils.format_date(last_rev.timestamp, last_rev.timezone))
763
730
def test_commit_time_bad_time(self):
764
731
tree = self.make_branch_and_tree('tree')
765
732
self.build_tree(['tree/hello.txt'])