comparison mercurial/hgweb.py @ 600:11c379e23ad6

Simplify RSS date generation -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Simplify RSS date generation manifest hash: 3b1628aaee450c292949f6d079b4a05ccb5ce6ab -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCyLatywK+sNU5EO8RAiLMAKCqYFyzSDCU6Wm34LSWZroAHMqa4QCfSWv6 jh/vvuQS0qmXybm6Ivd7XVY= =x1Rf -----END PGP SIGNATURE-----
author mpm@selenic.com
date Sun, 03 Jul 2005 20:10:21 -0800
parents 765182a4c843
children 8865eb8ade99
comparison
equal deleted inserted replaced
599:765182a4c843 600:11c379e23ad6
107 except KeyError: 107 except KeyError:
108 tmpl = self.cache[t] = file(self.map[t]).read() 108 tmpl = self.cache[t] = file(self.map[t]).read()
109 return template(tmpl, self.filters, **map) 109 return template(tmpl, self.filters, **map)
110 110
111 def rfc822date(x): 111 def rfc822date(x):
112 month= [None,"Jan", "Feb", "Mar", "Apr", "May", "Jun", 112 return strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime(x))
113 "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
114 yyyy,mon,dd,hh,mm,ss,wd,x,y = time.gmtime(x)
115 return "%d %s %d %d:%d:%d"%(dd, month[mon], yyyy, hh, mm, ss)
116 113
117 class hgweb: 114 class hgweb:
118 maxchanges = 10 115 maxchanges = 10
119 maxfiles = 10 116 maxfiles = 10
120 117