X-Git-Url: https://git.rkrishnan.org/?a=blobdiff_plain;f=src%2Fallmydata%2Fweb%2Froot.py;fp=src%2Fallmydata%2Fweb%2Froot.py;h=c46a6dd5f8bc5fb9c49f8199cc74d1a742bb47a8;hb=6226f6b497028889859dfcff56d4dbd7b65b8c2c;hp=8a9969c610f43a18097a8e904a3a19e35afa99d2;hpb=6d4a8bcd7f4af289e95195a2090c95b79a43ef59;p=tahoe-lafs%2Ftahoe-lafs.git diff --git a/src/allmydata/web/root.py b/src/allmydata/web/root.py index 8a9969c6..c46a6dd5 100644 --- a/src/allmydata/web/root.py +++ b/src/allmydata/web/root.py @@ -14,7 +14,7 @@ from allmydata.interfaces import IFileNode from allmydata.web import filenode, directory, unlinked, status, operations from allmydata.web import storage from allmydata.web.common import abbreviate_size, getxmlfile, WebError, \ - get_arg, RenderMixin, get_format, get_mutable_type, TIME_FORMAT + get_arg, RenderMixin, get_format, get_mutable_type, render_time class URIHandler(RenderMixin, rend.Page): @@ -171,7 +171,7 @@ class Root(rend.Page): # FIXME: This code is duplicated in root.py and introweb.py. def data_rendered_at(self, ctx, data): - return time.strftime(TIME_FORMAT, time.localtime()) + return render_time(time.time()) def data_version(self, ctx, data): return get_package_versions_string() def data_import_path(self, ctx, data): @@ -309,10 +309,8 @@ class Root(rend.Page): ctx.fillSlots("connected", connected) ctx.fillSlots("connected_alt", self._connectedalts[connected]) ctx.fillSlots("connected-bool", bool(rhost)) - ctx.fillSlots("since", time.strftime(TIME_FORMAT, - time.localtime(since))) - ctx.fillSlots("announced", time.strftime(TIME_FORMAT, - time.localtime(announced))) + ctx.fillSlots("since", render_time(since)) + ctx.fillSlots("announced", render_time(announced)) ctx.fillSlots("version", version) ctx.fillSlots("service_name", service_name) ctx.fillSlots("available_space", available_space)