Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
email: Add a space after the time and AM/PM in the login email.
kimry02adc11e5ba27d
diff --git a/zerver/signals.py b/zerver/signals.pyindex f3bb1c73abe..ac345d58b1a 100644--- a/zerver/signals.py+++ b/zerver/signals.py@@ -100,7 +100,7 @@ def email_on_new_login(sender: Any, user: UserProfile, request: Any, **kwargs: Aif user.twenty_four_hour_time:hhmm_string = local_time.strftime("%H:%M")else:- hhmm_string = local_time.strftime("%I:%M%p")+ hhmm_string = local_time.strftime("%I:%M %p")context["login_time"] = local_time.strftime(f"%A, %B %d, %Y at {hhmm_string} %Z")context["device_ip"] = request.META.get("REMOTE_ADDR") or _("Unknown IP address")context["device_os"] = get_device_os(user_agent) or _("an unknown operating system")diff --git a/zerver/tests/test_new_users.py b/zerver/tests/test_new_users.pyindex 40c06774089..344169e1bbf 100644--- a/zerver/tests/test_new_users.py+++ b/zerver/tests/test_new_users.py@@ -54,7 +54,7 @@ class SendLoginEmailTest(ZulipTestCase):)user_tz = zoneinfo.ZoneInfo(user.timezone)mock_time = datetime.datetime(year=2018, month=1, day=1, tzinfo=datetime.timezone.utc)- reference_time = mock_time.astimezone(user_tz).strftime("%A, %B %d, %Y at %I:%M%p %Z")+ reference_time = mock_time.astimezone(user_tz).strftime("%A, %B %d, %Y at %I:%M %p %Z")with mock.patch("zerver.signals.timezone_now", return_value=mock_time):self.client_post("/accounts/login/", info=login_info, HTTP_USER_AGENT=firefox_windows