X-Git-Url: https://git.rkrishnan.org/?a=blobdiff_plain;f=src%2Fallmydata%2Fweb%2Fintroweb.py;fp=src%2Fallmydata%2Fweb%2Fintroweb.py;h=2cfe6a55fb58064b0a8d7668f14a94886db6650e;hb=6226f6b497028889859dfcff56d4dbd7b65b8c2c;hp=6287af63131351a15bcbf3ee1fd118c9b18aafd8;hpb=6d4a8bcd7f4af289e95195a2090c95b79a43ef59;p=tahoe-lafs%2Ftahoe-lafs.git diff --git a/src/allmydata/web/introweb.py b/src/allmydata/web/introweb.py index 6287af63..2cfe6a55 100644 --- a/src/allmydata/web/introweb.py +++ b/src/allmydata/web/introweb.py @@ -7,7 +7,7 @@ import allmydata import simplejson from allmydata import get_package_versions_string from allmydata.util import idlib -from allmydata.web.common import getxmlfile, get_arg, TIME_FORMAT +from allmydata.web.common import getxmlfile, get_arg, render_time class IntroducerRoot(rend.Page): @@ -53,7 +53,7 @@ class IntroducerRoot(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): @@ -92,7 +92,7 @@ class IntroducerRoot(rend.Page): ctx.fillSlots("connection-hints", "connection hints: " + " ".join(ad.connection_hints)) ctx.fillSlots("connected", "?") - when_s = time.strftime("%H:%M:%S %d-%b-%Y", time.localtime(ad.when)) + when_s = render_time(ad.when) ctx.fillSlots("announced", when_s) ctx.fillSlots("version", ad.version) ctx.fillSlots("service_name", ad.service_name) @@ -105,7 +105,7 @@ class IntroducerRoot(rend.Page): ctx.fillSlots("nickname", s.nickname) ctx.fillSlots("tubid", s.tubid) ctx.fillSlots("connected", s.remote_address) - since_s = time.strftime("%H:%M:%S %d-%b-%Y", time.localtime(s.when)) + since_s = render_time(s.when) ctx.fillSlots("since", since_s) ctx.fillSlots("version", s.version) ctx.fillSlots("service_name", s.service_name)