From: Brian Warner Date: Thu, 19 Mar 2009 18:07:56 +0000 (-0700) Subject: storage status: report expiration-cutoff-date like 19-Mar-2009 (as opposed to the... X-Git-Tag: allmydata-tahoe-1.4.0~43 X-Git-Url: https://git.rkrishnan.org/listings/banana.xhtml?a=commitdiff_plain;h=186b6a8c018e0b15a8a904e3369e155e09ce785c;p=tahoe-lafs%2Ftahoe-lafs.git storage status: report expiration-cutoff-date like 19-Mar-2009 (as opposed to the tahoe.cfg input format of 2009-03-19), for redundancy: someone who gets the month and day switched will have a better chance to spot the problem in the storage-status output if it's in a different format --- diff --git a/src/allmydata/test/test_storage.py b/src/allmydata/test/test_storage.py index 23898df3..fa9d0664 100644 --- a/src/allmydata/test/test_storage.py +++ b/src/allmydata/test/test_storage.py @@ -2020,7 +2020,7 @@ class LeaseCrawler(unittest.TestCase, pollmixin.PollMixin, WebRenderingMixin): s = remove_tags(html) self.failUnlessIn("Expiration Enabled:" " expired leases will be removed", s) - date = time.strftime("%Y-%m-%d", time.gmtime(then)) + date = time.strftime("%d-%b-%Y", time.gmtime(then)) self.failUnlessIn("Leases created or last renewed before %s" " will be considered expired." % date, s) self.failUnlessIn(" recovered: 2 shares, 2 buckets (1 mutable / 1 immutable), ", s) diff --git a/src/allmydata/web/storage.py b/src/allmydata/web/storage.py index b35839ea..079f68a9 100644 --- a/src/allmydata/web/storage.py +++ b/src/allmydata/web/storage.py @@ -139,7 +139,7 @@ class StorageStatus(rend.Page): % abbreviate_time(lc.override_lease_duration)] else: assert lc.mode == "cutoff-date" - date = time.strftime("%Y-%m-%d", time.gmtime(lc.cutoff_date)) + date = time.strftime("%d-%b-%Y", time.gmtime(lc.cutoff_date)) ctx.tag["Leases created or last renewed before %s " "will be considered expired." % date] if len(lc.mode) > 2: