diff --git a/authentik/root/settings.py b/authentik/root/settings.py index 3975f7d8e..3df86786d 100644 --- a/authentik/root/settings.py +++ b/authentik/root/settings.py @@ -142,6 +142,7 @@ SWAGGER_SETTINGS = { REST_FRAMEWORK = { "DEFAULT_PAGINATION_CLASS": "authentik.api.pagination.Pagination", "PAGE_SIZE": 100, + 'DATETIME_FORMAT': '%s', "DEFAULT_FILTER_BACKENDS": [ "rest_framework_guardian.filters.ObjectPermissionsFilter", "django_filters.rest_framework.DjangoFilterBackend", diff --git a/web/src/utils.ts b/web/src/utils.ts index 9398fffda..36d6c300b 100644 --- a/web/src/utils.ts +++ b/web/src/utils.ts @@ -50,3 +50,7 @@ export function loading(v: T, actual: TemplateResult): TemplateResult { } return actual; } + +export function time(t: string): Date { + return new Date(parseInt(t, 10) * 1000); +}