mirror of
https://github.com/GOSTSec/gostweb
synced 2025-03-13 05:41:33 +00:00
11 lines
235 B
Python
11 lines
235 B
Python
from django import template
|
|
|
|
register = template.Library()
|
|
|
|
@register.filter
|
|
def timestamp_to_time(timestamp):
|
|
"""Converts a timestamp into datetime obj"""
|
|
import datetime
|
|
return datetime.datetime.fromtimestamp(timestamp)
|
|
|