Mercurial > treepkg
comparison contrib/sawmill/web/templates/details.html @ 480:e97e8dd52a0c
Add a Z to the times to underline that we are on UTC time
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Fri, 17 Sep 2010 15:45:53 +0000 |
parents | fa8a5205698c |
children | 9c7e1d957d6b |
comparison
equal
deleted
inserted
replaced
479:fa8a5205698c | 480:e97e8dd52a0c |
---|---|
88 if not s: return d | 88 if not s: return d |
89 return escape(s) | 89 return escape(s) |
90 | 90 |
91 def pretty_time(t, format="%H:%M:%S"): | 91 def pretty_time(t, format="%H:%M:%S"): |
92 if not t: return "<unknown>" | 92 if not t: return "<unknown>" |
93 return t.strftime(format) | 93 return t.strftime(format)+"Z" |
94 | 94 |
95 def pretty_timedelta(a, b): | 95 def pretty_timedelta(a, b): |
96 if a is None or b is None: return "<unknown>" | 96 if a is None or b is None: return "<unknown>" |
97 td = a - b | 97 td = a - b |
98 secs = td.days * 24*3600 + td.seconds | 98 secs = td.days * 24*3600 + td.seconds |