mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Move local_now() to utilities.datetime
This commit is contained in:
13
netbox/utilities/datetime.py
Normal file
13
netbox/utilities/datetime.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from django.utils import timezone
|
||||
from django.utils.timezone import localtime
|
||||
|
||||
__all__ = (
|
||||
'local_now',
|
||||
)
|
||||
|
||||
|
||||
def local_now():
|
||||
"""
|
||||
Return the current date & time in the system timezone.
|
||||
"""
|
||||
return localtime(timezone.now())
|
||||
Reference in New Issue
Block a user