commands/dump: use local timezone and shorter date format
This commit is contained in:
parent
81eb15c2e0
commit
95960d3b6c
|
@ -21,7 +21,7 @@ class Command(BaseCommand):
|
|||
_, columns = os.popen("stty size", "r").read().split()
|
||||
for entry in Entry.objects.dump(lines=options['lines']):
|
||||
line = "%s %s %s" % (
|
||||
entry.timestamp.strftime("%c"),
|
||||
entry.timestamp.astimezone().strftime("%b %d %X"),
|
||||
entry.host,
|
||||
entry.data.get("MESSAGE"),
|
||||
)
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<tbody>
|
||||
{% for line in object_list %}
|
||||
<tr>
|
||||
<td>{{ line.timestamp }}</td>
|
||||
<td>{{ line.timestamp|date:'b d H:i:s' }}</td>
|
||||
<td>{{ line.host }}</td>
|
||||
<td>{{ line.data.MESSAGE }}</td>
|
||||
</tr>
|
||||
|
|
Reference in New Issue