commands/dump: use local timezone and shorter date format

This commit is contained in:
Christophe Siraut 2020-09-10 14:05:57 +02:00
parent 81eb15c2e0
commit 95960d3b6c
2 changed files with 2 additions and 2 deletions

View File

@ -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"),
)

View File

@ -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>