Merge lp:~malept/bzr-builder/bug.394117 into lp:~james-w/bzr-builder/trunk-old

Proposed by Mark Lee
Status: Merged
Merged at revision: not available
Proposed branch: lp:~malept/bzr-builder/bug.394117
Merge into: lp:~james-w/bzr-builder/trunk-old
Diff against target: None lines
To merge this branch: bzr merge lp:~malept/bzr-builder/bug.394117
Reviewer Review Type Date Requested Status
James Westby Approve
Mark Lee (community) Abstain
Review via email: mp+8072@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Mark Lee (malept) wrote :

See bug #394117 for details.

Revision history for this message
James Westby (james-w) wrote :

> See bug #394117 for details.

Hi,

Thanks for looking on this, and your fix makes sense.

I just wonder if the code itself (rather than just the test)
should use the UTC timestamp. I don't think users would expect
that, but I wonder if we should to avoid issues with timezone
changes.

I think this is good to land, but if you have an opinion on
the above I would love to hear it.

Thanks,

James

review: Needs Information
Revision history for this message
Mark Lee (malept) wrote :

Hi,

> > See bug #394117 for details.
>
> Hi,
>
> Thanks for looking on this, and your fix makes sense.
>
> I just wonder if the code itself (rather than just the test)
> should use the UTC timestamp. I don't think users would expect
> that, but I wonder if we should to avoid issues with timezone
> changes.
>
> I think this is good to land, but if you have an opinion on
> the above I would love to hear it.

I think that if it's expected to be used by two or more packagers who are in different timezones (probably a common use case when PPA support is added), then UTC timestamps are the best solution. It shouldn't be too confusing if it's documented in `bzr help builder`.

-Mark

review: Abstain
Revision history for this message
James Westby (james-w) wrote :

Approved, thanks.

I'm also going to make the code itself use UTC.

Thanks,

James

review: Approve
Revision history for this message
James Westby (james-w) wrote :

And what do you know, once I look I realise the code
was using UTC all along.

Sorry for the delay and thanks for the contribution.

James

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/test_recipe.py'
2--- tests/test_recipe.py 2009-04-22 18:44:03 +0000
3+++ tests/test_recipe.py 2009-07-01 04:09:36 +0000
4@@ -739,12 +739,12 @@
5 self.assertTrue(rbranch1.different_shape_to(rbranch2))
6
7 def test_substitute_time(self):
8- time = datetime.datetime.fromtimestamp(1)
9+ time = datetime.datetime.utcfromtimestamp(1)
10 base_branch = BaseRecipeBranch("base_url", "1-{time}")
11 base_branch.substitute_time(time)
12- self.assertEqual("1-197001010100", base_branch.deb_version)
13+ self.assertEqual("1-197001010000", base_branch.deb_version)
14 base_branch.substitute_time(time)
15- self.assertEqual("1-197001010100", base_branch.deb_version)
16+ self.assertEqual("1-197001010000", base_branch.deb_version)
17
18 def test_substitute_revno(self):
19 base_branch = BaseRecipeBranch("base_url", "1")

Subscribers

People subscribed via source and target branches