Skip to content

Commit 2618dde

Browse files
committed
Fixes #6236: Journal entry title should account for configured timezone
1 parent 1dd9f8c commit 2618dde

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/release-notes/version-2.11.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Bug Fixes
66

7+
* [#6236](https://github.com/netbox-community/netbox/issues/6236) - Journal entry title should account for configured timezone
78
* [#6246](https://github.com/netbox-community/netbox/issues/6246) - Permit full-length descriptions when creating device components and VM interfaces
89
* [#6248](https://github.com/netbox-community/netbox/issues/6248) - Fix table column reconfiguration under Chrome
910
* [#6252](https://github.com/netbox-community/netbox/issues/6252) - Fix assignment of console port speed values above 19.2kbps

netbox/extras/models/models.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,9 @@ class Meta:
431431
verbose_name_plural = 'journal entries'
432432

433433
def __str__(self):
434-
return f"{date_format(self.created)} - {time_format(self.created)} ({self.get_kind_display()})"
434+
created_date = timezone.localdate(self.created)
435+
created_time = timezone.localtime(self.created)
436+
return f"{date_format(created_date)} - {time_format(created_time)} ({self.get_kind_display()})"
435437

436438
def get_absolute_url(self):
437439
return reverse('extras:journalentry', args=[self.pk])

0 commit comments

Comments
 (0)