Mercurial > treepkg
comparison contrib/sawmill/web/templates/details.html @ 481:9c7e1d957d6b
sawmill: Not all displayed times are in UTC so the
general 'Z's at all times/dates are removed. Now
it is only mentioned that the times in the main
table are in UTC. To reduce the optical noise
this is done by simple comments in the date rows.
author | Sascha Teichmann <teichmann@intevation.de> |
---|---|
date | Sat, 18 Sep 2010 07:50:53 +0000 |
parents | e97e8dd52a0c |
children | a89f73f7c965 |
comparison
equal
deleted
inserted
replaced
480:e97e8dd52a0c | 481:9c7e1d957d6b |
---|---|
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)+"Z" | 93 return t.strftime(format) |
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 |
148 # for all track items | 148 # for all track items |
149 curr_date = date_from_datetime(track_item.build_start) | 149 curr_date = date_from_datetime(track_item.build_start) |
150 if curr_date != last_date: | 150 if curr_date != last_date: |
151 last_date = curr_date | 151 last_date = curr_date |
152 %> | 152 %> |
153 <tr class="date_row"><td colspan="6"><%= pretty_time(last_date, "%Y-%m-%d") %></td></tr> | 153 <tr class="date_row"><td colspan="6"><%= pretty_time(last_date, "%Y-%m-%d") %> (times in UTC)</td></tr> |
154 <% | 154 <% |
155 # date changed | 155 # date changed |
156 %> | 156 %> |
157 <tr class="<%= STATUS2CLASS.get(track_item.build_status, 'error') %>"> | 157 <tr class="<%= STATUS2CLASS.get(track_item.build_status, 'error') %>"> |
158 <td><%= STATUS2MSG.get(track_item.build_status, 'error') %></td> | 158 <td><%= STATUS2MSG.get(track_item.build_status, 'error') %></td> |