From d0b7ea604f223f33fe66a3bd8134d2b2391338f1 Mon Sep 17 00:00:00 2001 From: drfho Date: Thu, 6 Feb 2025 19:39:09 +0800 Subject: [PATCH] fixed determination of dst (daylight saving time) Ref: https://github.com/idasm-unibe-ch/unibe-cms/issues/850 --- Products/zms/_objattrs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Products/zms/_objattrs.py b/Products/zms/_objattrs.py index 4d9e3c658..a51602fff 100644 --- a/Products/zms/_objattrs.py +++ b/Products/zms/_objattrs.py @@ -671,7 +671,7 @@ def isActive(self, REQUEST): obj_vers = self.getObjVersion(REQUEST) obj_attrs = self.getObjAttrs() now = datetime.datetime.now() - dst = time.daylight == 1 and 1 or 0 # Daylight saving time. + dst = time.localtime().tm_isdst == 1 and 1 or 0 # Daylight saving time. for key in ['active', 'attr_active_start', 'attr_active_end']: if key in obj_attrs: obj_attr = obj_attrs[key]