From f6d87380f4221fce6f112400ab9374b153258698 Mon Sep 17 00:00:00 2001 From: drfho Date: Tue, 14 Jun 2022 13:18:12 +0200 Subject: [PATCH] fixed sorting of struct_time fields (RBZ) --- Products/zms/_globals.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Products/zms/_globals.py b/Products/zms/_globals.py index 721a80aa7..3393d7c43 100644 --- a/Products/zms/_globals.py +++ b/Products/zms/_globals.py @@ -22,6 +22,7 @@ # Imports. from Products.PageTemplates.Expressions import SecureModuleImporter from Products.PageTemplates.PageTemplateFile import PageTemplateFile +import time import six import sys @@ -123,6 +124,8 @@ def validate(self, reference, attempt): u'Я': 'JA',} def sort_item( i): + if isinstance(i, time.struct_time): + i = time.strftime('%Y%m%d%H%M%S',i) if isinstance(i, bytes): i = i.decode('utf-8') if isinstance(i, str):