From a069f49719adde298ce394131ae963450d00a6ea Mon Sep 17 00:00:00 2001 From: Jon Pentland Date: Mon, 24 Oct 2022 21:09:49 +0100 Subject: [PATCH] Change timezone to America/Los_Angeles to expose DateTime exceptions --- plone/app/discussion/tests/test_conversation.py | 6 +++--- plone/app/discussion/tests/test_indexers.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plone/app/discussion/tests/test_conversation.py b/plone/app/discussion/tests/test_conversation.py index ba70de9..b14888e 100644 --- a/plone/app/discussion/tests/test_conversation.py +++ b/plone/app/discussion/tests/test_conversation.py @@ -38,7 +38,7 @@ class ConversationTest(unittest.TestCase): # Set the portal timezone to something non-utc reg_key = "plone.portal_timezone" registry = getUtility(IRegistry) - registry[reg_key] = "Europe/Berlin" + registry[reg_key] = "America/Los_Angeles" self.typetool = self.portal.portal_types self.portal_discussion = getToolByName( @@ -98,8 +98,8 @@ class ConversationTest(unittest.TestCase): conversation.addComment(comment) # Check that comments have the correct portal timezones - self.assertTrue(comment.creation_date.tzinfo, tz.gettz("Europe/Berlin")) - self.assertTrue(comment.modification_date.tzinfo, tz.gettz("Europe/Berlin")) + self.assertTrue(comment.creation_date.tzinfo, tz.gettz("America/Los_Angeles")) + self.assertTrue(comment.modification_date.tzinfo, tz.gettz("America/Los_Angeles")) # Remove the timezone from the comment dates comment.creation_date = datetime.utcnow() diff --git a/plone/app/discussion/tests/test_indexers.py b/plone/app/discussion/tests/test_indexers.py index 5944b85..d654e45 100644 --- a/plone/app/discussion/tests/test_indexers.py +++ b/plone/app/discussion/tests/test_indexers.py @@ -40,10 +40,10 @@ class ConversationIndexersTest(unittest.TestCase): workflow = self.portal.portal_workflow workflow.doActionFor(self.portal.doc1, "publish") - # Change the timezone to europe to test timezones properly + # Change the timezone to PDT to test timezones properly reg_key = "plone.portal_timezone" registry = getUtility(IRegistry) - registry[reg_key] = "Europe/Berlin" + registry[reg_key] = "America/Los_Angeles" self.portal_timezone = tz.gettz(default_timezone()) # Create a conversation.