Create a folder in your Django application and name it template_tags
Create a .py file with your desired name of the template. In this case, to_localtime.py
Here we are creating a custom tag to convert UTC to local time.

@register.filter makes it to be available as a template tag
next step is to add this template tag in the templates section as a library in settings.py