From 36bbc9bc08cacd97636b598e2022c5b3bf43a4b6 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Tue, 15 Nov 2022 09:53:21 -0400 Subject: [PATCH] test: increase number of tries to find tz not near midnight (#4756) --- ietf/utils/timezone.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/utils/timezone.py b/ietf/utils/timezone.py index be29ca0ac..a396b5e82 100644 --- a/ietf/utils/timezone.py +++ b/ietf/utils/timezone.py @@ -96,7 +96,7 @@ def timezone_not_near_midnight(): right_now = timezone.now().astimezone(ZoneInfo(tzname)) # Avoid the remote possibility of an infinite loop (might come up # if there is a problem with the time zone library) - tries_left = 20 + tries_left = 50 while right_now.hour < 1 or right_now.hour >= 23: tzname = random.choice(timezone_options) right_now = right_now.astimezone(ZoneInfo(tzname))