Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

docs: Add missing space in “time zone”.

Anders Kaseorg21cd1c10b3f1
diff --git a/analytics/lib/counts.py b/analytics/lib/counts.py
index e2ca1ba6002..8afc0068ba6 100644
--- a/analytics/lib/counts.py
+++ b/analytics/lib/counts.py
@@ -168,7 +168,7 @@ def do_update_fill_state(fill_state: FillState, end_time: datetime, state: int)
# We assume end_time is valid (e.g. is on a day or hour boundary as appropriate)
-# and is timezone aware. It is the caller's responsibility to enforce this!
+# and is time-zone-aware. It is the caller's responsibility to enforce this!
def do_fill_count_stat_at_hour(
stat: CountStat, end_time: datetime, realm: Optional[Realm] = None
) -> None:
diff --git a/analytics/management/commands/check_analytics_state.py b/analytics/management/commands/check_analytics_state.py
index 79c86fe2649..d34aa27fdca 100644
--- a/analytics/management/commands/check_analytics_state.py
+++ b/analytics/management/commands/check_analytics_state.py
@@ -8,7 +8,7 @@ from django.utils.timezone import now as timezone_now
from analytics.lib.counts import COUNT_STATS, CountStat
from analytics.models import installation_epoch
-from zerver.lib.timestamp import TimezoneNotUTCException, floor_to_day, floor_to_hour, verify_UTC
+from zerver.lib.timestamp import TimeZoneNotUTCException, floor_to_day, floor_to_hour, verify_UTC
from zerver.models import Realm
states = {
@@ -48,7 +48,7 @@ class Command(BaseCommand):
last_fill = installation_epoch()
try:
verify_UTC(last_fill)
- except TimezoneNotUTCException:
+ except TimeZoneNotUTCException:
return {"status": 2, "message": f"FillState not in UTC for {property}"}
if stat.frequency == CountStat.DAY:
diff --git a/analytics/management/commands/update_analytics_counts.py b/analytics/management/commands/update_analytics_counts.py
index 9da4334461b..28693fe3e6f 100644
--- a/analytics/management/commands/update_analytics_counts.py
+++ b/analytics/management/commands/update_analytics_counts.py
@@ -65,7 +65,7 @@ class Command(BaseCommand):
fill_to_time = fill_to_time.replace(tzinfo=timezone.utc)
if fill_to_time.tzinfo is None:
raise ValueError(
- "--time must be timezone aware. Maybe you meant to use the --utc option?"
+ "--time must be time-zone-aware. Maybe you meant to use the --utc option?"
)
fill_to_time = floor_to_hour(fill_to_time.astimezone(timezone.utc))
diff --git a/analytics/tests/test_counts.py b/analytics/tests/test_counts.py
index 0fbce7f4205..64f93d6781d 100644
--- a/analytics/tests/test_counts.py
+++ b/analytics/tests/test_counts.py
@@ -49,7 +49,7 @@ from zerver.lib.actions import (
from zerver.lib.create_user import create_user
from zerver.lib.exceptions import InvitationError
from zerver.lib.test_classes import ZulipTestCase
-from zerver.lib.timestamp import TimezoneNotUTCException, floor_to_day
+from zerver.lib.timestamp import TimeZoneNotUTCException, floor_to_day
from zerver.lib.topic import DB_TOPIC_NAME
from zerver.lib.utils import assert_is_not_none
from zerver.models import (
@@ -275,7 +275,7 @@ class TestProcessCountStat(AnalyticsTestCase):
stat = self.make_dummy_count_stat("test stat")
with self.assertRaises(ValueError):
process_count_stat(stat, installation_epoch() + 65 * self.MINUTE)
- with self.assertRaises(TimezoneNotUTCException):
+ with self.assertRaises(TimeZoneNotUTCException):
process_count_stat(stat, installation_epoch().replace(tzinfo=None))
# This tests the LoggingCountStat branch of the code in do_delete_counts_at_hour.
diff --git a/corporate/views/billing_page.py b/corporate/views/billing_page.py
index 626b6717fd7..1efcb72cb28 100644
--- a/corporate/views/billing_page.py
+++ b/corporate/views/billing_page.py
@@ -109,7 +109,7 @@ def billing_home(
licenses_at_next_renewal = last_ledger_entry.licenses_at_next_renewal
seat_count = get_latest_seat_count(user.realm)
- # Should do this in javascript, using the user's timezone
+ # Should do this in JavaScript, using the user's time zone
if plan.is_free_trial():
assert plan.next_invoice_date is not None
renewal_date = "{dt:%B} {dt.day}, {dt.year}".format(dt=plan.next_invoice_date)
diff --git a/docs/contributing/code-style.md b/docs/contributing/code-style.md
index 89f3fe6aca9..916db3cd95b 100644
--- a/docs/contributing/code-style.md
+++ b/docs/contributing/code-style.md
@@ -164,11 +164,11 @@ of getting at least one of these things wrong.
### Naive datetime objects
-Python allows datetime objects to not have an associated timezone, which can
+Python allows datetime objects to not have an associated time zone, which can
cause time-related bugs that are hard to catch with a test suite, or bugs
that only show up during daylight savings time.
-Good ways to make timezone-aware datetimes are below. We import timezone
+Good ways to make time-zone-aware datetimes are below. We import time zone
libraries as `from datetime import datetime, timezone` and
`from django.utils.timezone import now as timezone_now`.
@@ -184,7 +184,7 @@ Use:
- `datetime.strptime(date_string, format).replace(tzinfo=timezone.utc)` if
creating a datetime from a formatted string that is in UTC.
-Idioms that result in timezone-naive datetimes, and should be avoided, are
+Idioms that result in time-zone-naive datetimes, and should be avoided, are
`datetime.now()` and `datetime.fromtimestamp(timestamp)` without a `tz`
parameter, `datetime.utcnow()` and `datetime.utcfromtimestamp()`, and
`datetime.strptime(date_string, format)` without replacing the `tzinfo` at
diff --git a/docs/contributing/summer-with-zulip.md b/docs/contributing/summer-with-zulip.md
index 37400df0eec..3721583f4e9 100644
--- a/docs/contributing/summer-with-zulip.md
+++ b/docs/contributing/summer-with-zulip.md
@@ -264,8 +264,8 @@ Success for the contributor means a few things, in order of importance:
- Timely feedback is more important than complete feedback, so get a fast
feedback cadence going with your contributor. It's amazing how useful just 5
- minutes of feedback can be. Pay attention to the relative timezones; if you
- plan it, you can get several round trips in per day even with big timezone
+ minutes of feedback can be. Pay attention to the relative time zones; if you
+ plan it, you can get several round trips in per day even with big time zone
differences like USA + India.
- What exactly you focus on in your mentorship will vary from week to week and
diff --git a/docs/overview/changelog.md b/docs/overview/changelog.md
index 10fae31506b..c1993dbd4b1 100644
--- a/docs/overview/changelog.md
+++ b/docs/overview/changelog.md
@@ -708,7 +708,7 @@ log][commit-log] for an up-to-date list of raw changes.
- Added new email address visibility option hiding real email
addresses from organization administrators in the Zulip UI.
- Added new "Mention time" Markdown feature to communicate about times
- in a timezone-aware fashion.
+ in a time-zone-aware fashion.
- Added new "Spoiler" Markdown feature to hide text until interaction.
- Added a new API that allows the mobile/desktop/terminal apps to
open uploaded files in an external browser that may not be logged in.
diff --git a/frontend_tests/node_tests/composebox_typeahead.js b/frontend_tests/node_tests/composebox_typeahead.js
index 8df9df0dcab..ec5c6f4103c 100644
--- a/frontend_tests/node_tests/composebox_typeahead.js
+++ b/frontend_tests/node_tests/composebox_typeahead.js
@@ -1364,11 +1364,13 @@ test("begins_typeahead", ({override, override_rewire}) => {
// time_jump
assert_typeahead_equals("<tim", false);
assert_typeahead_equals("<timerandom", false);
- assert_typeahead_equals("<time", ["translated: Mention a timezone-aware time"]);
- assert_typeahead_equals("<time:", ["translated: Mention a timezone-aware time"]);
- assert_typeahead_equals("<time:something", ["translated: Mention a timezone-aware time"]);
- assert_typeahead_equals("<time:something", "> ", ["translated: Mention a timezone-aware time"]);
- assert_typeahead_equals("<time:something>", ["translated: Mention a timezone-aware time"]);
+ assert_typeahead_equals("<time", ["translated: Mention a time-zone-aware time"]);
+ assert_typeahead_equals("<time:", ["translated: Mention a time-zone-aware time"]);
+ assert_typeahead_equals("<time:something", ["translated: Mention a time-zone-aware time"]);
+ assert_typeahead_equals("<time:something", "> ", [
+ "translated: Mention a time-zone-aware time",
+ ]);
+ assert_typeahead_equals("<time:something>", ["translated: Mention a time-zone-aware time"]);
assert_typeahead_equals("<time:something> ", false); // Already completed the mention
// Following tests place the cursor before the second string
diff --git a/requirements/common.in b/requirements/common.in
index c2c7b2b588c..33866c4f3b2 100644
--- a/requirements/common.in
+++ b/requirements/common.in
@@ -74,7 +74,7 @@ django-bmemcached
# Needed for zerver/tests/test_timestamp.py
python-dateutil
-# Needed for timezone work
+# Needed for time zone work
pytz
# Needed for Redis
diff --git a/static/.gitignore b/static/.gitignore
index 589ab283f30..cb4096fb00d 100644
--- a/static/.gitignore
+++ b/static/.gitignore
@@ -10,7 +10,7 @@
/generated/emoji-styles
# From passing pygments data to the frontend
/generated/pygments_data.json
-# From passing timezones data to the frontend
+# From passing time zone data to the frontend
/generated/timezones.json
# Legacy emoji data directory
/third/emoji-data
diff --git a/static/js/composebox_typeahead.js b/static/js/composebox_typeahead.js
index 8cfb668ca60..f3ec98333f6 100644
--- a/static/js/composebox_typeahead.js
+++ b/static/js/composebox_typeahead.js
@@ -733,7 +733,7 @@ export function get_candidates(query) {
const time_jump_regex = /<time(:([^>]*?)>?)?$/;
if (time_jump_regex.test(split[0])) {
this.completing = "time_jump";
- return [$t({defaultMessage: "Mention a timezone-aware time"})];
+ return [$t({defaultMessage: "Mention a time-zone-aware time"})];
}
}
return false;
diff --git a/static/js/rendered_markdown.js b/static/js/rendered_markdown.js
index 76da9a87bad..77e1f41447c 100644
--- a/static/js/rendered_markdown.js
+++ b/static/js/rendered_markdown.js
@@ -157,7 +157,7 @@ export const update_elements = (content) => {
content.find("time").each(function () {
// Populate each timestamp span with mentioned time
- // in user's local timezone.
+ // in user's local time zone.
const time_str = $(this).attr("datetime");
if (time_str === undefined) {
return;
diff --git a/static/js/timerender.ts b/static/js/timerender.ts
index 038cd5f2b7b..d36b5d33c19 100644
--- a/static/js/timerender.ts
+++ b/static/js/timerender.ts
@@ -33,7 +33,7 @@ export function get_tz_with_UTC_offset(time: number | Date): string {
return "UTC";
}
- // When user's locale doesn't match their timezone (eg. en_US for IST),
+ // When user's locale doesn't match their time zone (eg. en_US for IST),
// we get `timezone` in the format of'GMT+x:y. We don't want to
// show that along with (UTC+x:y)
timezone = /GMT[+-][\d:]*/.test(timezone ?? "") ? "" : timezone;
diff --git a/templates/zerver/help/change-your-timezone.md b/templates/zerver/help/change-your-timezone.md
index a3d04433dbc..def9af3fdfe 100644
--- a/templates/zerver/help/change-your-timezone.md
+++ b/templates/zerver/help/change-your-timezone.md
@@ -1,19 +1,19 @@
-# Change your timezone
+# Change your time zone
-Zulip always uses your computer's timezone for displaying dates and
+Zulip always uses your computer's time zone for displaying dates and
timestamps (note that you need to reload Zulip after changing your
-computer's timezone for changes to take effect).
+computer's time zone for changes to take effect).
-By default, Zulip also indirectly displays your timezone to others, via the
+By default, Zulip also indirectly displays your time zone to others, via the
**Local time** field of your [user profile](/help/view-someones-profile).
-You can change the timezone Zulip displays to others.
+You can change the time zone Zulip displays to others.
-### Change your timezone
+### Change your time zone
{start_tabs}
{settings_tab|profile}
-2. Under **Profile**, select a timezone.
+2. Under **Profile**, select a time zone.
{end_tabs}
diff --git a/templates/zerver/help/format-your-message-using-markdown.md b/templates/zerver/help/format-your-message-using-markdown.md
index c19dd0353d1..775c91cd1ce 100644
--- a/templates/zerver/help/format-your-message-using-markdown.md
+++ b/templates/zerver/help/format-your-message-using-markdown.md
@@ -210,11 +210,11 @@ the variant that only contains the user ID).
## Global times
-When collaborating with people in another timezone, you often need to
-express a specific time clearly. Rather than typing out your timezone
+When collaborating with people in another time zone, you often need to
+express a specific time clearly. Rather than typing out your time zone
and having everyone translate the time in their heads, in Zulip, you
can mention a time, and it'll be displayed to each user in their own
-timezone (just like the timestamps on Zulip messages).
+time zone (just like the timestamps on Zulip messages).
A date picker will appear once you type `<time`.
diff --git a/templates/zerver/help/include/sidebar_index.md b/templates/zerver/help/include/sidebar_index.md
index a44ca760c72..e4269f388f6 100755
--- a/templates/zerver/help/include/sidebar_index.md
+++ b/templates/zerver/help/include/sidebar_index.md
@@ -46,7 +46,7 @@
* [Review your settings](/help/review-your-settings)
* [Dark theme](/help/dark-theme)
* [Change your language](/help/change-your-language)
-* [Change your timezone](/help/change-your-timezone)
+* [Change your time zone](/help/change-your-timezone)
* [Use 24-hour time](/help/change-the-time-format)
* [Enable emoticon translations](/help/enable-emoticon-translations)
* [Configure default view](/help/configure-default-view)
diff --git a/templates/zerver/help/using-zulip-for-a-class.md b/templates/zerver/help/using-zulip-for-a-class.md
index 12c461d8053..c4ca15e5a66 100644
--- a/templates/zerver/help/using-zulip-for-a-class.md
+++ b/templates/zerver/help/using-zulip-for-a-class.md
@@ -35,7 +35,7 @@ from today’s lecture. [lecture notes 10/2.pdf]() You can view a recording of t
### Formatting tips
* You can [post a time](/help/format-your-message-using-markdown#global-times)
- that everyone will see in their own timezone.
+ that everyone will see in their own time zone.
* Share URLs as [named links](/help/format-your-message-using-markdown#links).
## Answering students’ questions
diff --git a/templates/zerver/why-zulip.md b/templates/zerver/why-zulip.md
index 3c62bc2a298..4d03de09f61 100644
--- a/templates/zerver/why-zulip.md
+++ b/templates/zerver/why-zulip.md
@@ -37,7 +37,7 @@ random spam.
## Remote workers can’t participate.
-This means that workers in different timezones can only effectively
+This means that workers in different time zones can only effectively
collaborate during the narrow windows when everyone is at their
keyboards. As a result, Slack isn’t an effective communication
platform for remote work.
@@ -97,7 +97,7 @@ However, asynchronous communication is fundamental to how work happens today:
* Managers, PMs, and others in meetings all day need to reply to things in
batch, either in the few minutes they have between meetings, or at the end
of the day.
-* Anyone in a different timezone or on a different work schedule than the
+* Anyone in a different time zone or on a different work schedule than the
rest of the team has parts of their day where they are working
asynchronously.
* Individual contributors cannot do focused work if they need to check their
diff --git a/tools/setup/emoji/emoji_names.py b/tools/setup/emoji/emoji_names.py
index b1754cf2142..edab1ae5671 100644
--- a/tools/setup/emoji/emoji_names.py
+++ b/tools/setup/emoji/emoji_names.py
@@ -1545,7 +1545,7 @@ EMOJI_NAME_MAPS: Dict[str, Dict[str, Any]] = {
# 24-hour time (used in many countries), like what is 00:30 or 01:00
# called, c) it's hard to make the compose typeahead experience great, and
# d) we should have a dedicated time voting widget that takes care of
- # timezone and locale issues, and uses a digital representation.
+ # time zone and locale issues, and uses a digital representation.
# '1f550': {'canonical_name': 'X', 'aliases': ['clock1']},
# '1f551': {'canonical_name': 'X', 'aliases': ['clock2']},
# '1f552': {'canonical_name': 'X', 'aliases': ['clock3']},
diff --git a/tools/update-prod-static b/tools/update-prod-static
index 807882d68b4..a50177007e9 100755
--- a/tools/update-prod-static
+++ b/tools/update-prod-static
@@ -41,7 +41,7 @@ run(["./tools/setup/generate_zulip_bots_static_files.py"])
# Build pygments data
run(["./tools/setup/build_pygments_data"])
-# Build timezones data
+# Build time zone data
run(["./tools/setup/build_timezone_values"])
# Create webpack bundle
diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py
index 1c61042a6aa..ae57eacf813 100644
--- a/zerver/lib/actions.py
+++ b/zerver/lib/actions.py
@@ -5746,7 +5746,7 @@ def do_change_user_setting(
lambda: send_event(user_profile.realm, legacy_event, [user_profile.id])
)
- # Updates to the timezone display setting are sent to all users
+ # Updates to the time zone display setting are sent to all users
if setting_name == "timezone":
payload = dict(
email=user_profile.email,
diff --git a/zerver/lib/create_user.py b/zerver/lib/create_user.py
index 43982f36b12..a1be5de566a 100644
--- a/zerver/lib/create_user.py
+++ b/zerver/lib/create_user.py
@@ -177,7 +177,7 @@ def create_user(
# If a source profile was specified, we copy settings from that
# user. Note that this is positioned in a way that overrides
# other arguments passed in, which is correct for most defaults
- # like timezone where the source profile likely has a better value
+ # like time zone where the source profile likely has a better value
# than the guess. As we decide on details like avatars and full
# names for this feature, we may want to move it.
if source_profile is not None:
diff --git a/zerver/lib/events.py b/zerver/lib/events.py
index ae4d68c1e14..0bfa1a446e0 100644
--- a/zerver/lib/events.py
+++ b/zerver/lib/events.py
@@ -1207,7 +1207,7 @@ def apply_event(
assert event["notification_name"] in UserProfile.notification_settings_legacy
state[event["notification_name"]] = event["setting"]
elif event["type"] == "user_settings":
- # timezone setting is not included in property_types dict because
+ # time zone setting is not included in property_types dict because
# this setting is not a part of UserBaseSettings class.
if event["property"] != "timezone":
assert event["property"] in UserProfile.property_types
diff --git a/zerver/lib/timestamp.py b/zerver/lib/timestamp.py
index 31e3abbe538..3c54d5003fd 100644
--- a/zerver/lib/timestamp.py
+++ b/zerver/lib/timestamp.py
@@ -2,13 +2,13 @@ import calendar
import datetime
-class TimezoneNotUTCException(Exception):
+class TimeZoneNotUTCException(Exception):
pass
def verify_UTC(dt: datetime.datetime) -> None:
if dt.tzinfo is None or dt.tzinfo.utcoffset(dt) != datetime.timezone.utc.utcoffset(dt):
- raise TimezoneNotUTCException(f"Datetime {dt} does not have a UTC timezone.")
+ raise TimeZoneNotUTCException(f"Datetime {dt} does not have a UTC time zone.")
def convert_to_UTC(dt: datetime.datetime) -> datetime.datetime:
diff --git a/zerver/models.py b/zerver/models.py
index c7344b179ee..088877b59dc 100644
--- a/zerver/models.py
+++ b/zerver/models.py
@@ -1761,7 +1761,7 @@ class UserProfile(AbstractBaseUser, PermissionsMixin, UserBaseSettings):
)
default_all_public_streams: bool = models.BooleanField(default=False)
- # A timezone name from the `tzdata` database, as found in pytz.all_timezones.
+ # A time zone name from the `tzdata` database, as found in pytz.all_timezones.
#
# The longest existing name is 32 characters long, so max_length=40 seems
# like a safe choice.
@@ -3277,7 +3277,7 @@ class Attachment(AbstractAttachment):
"path_id": self.path_id,
"size": self.size,
# convert to JavaScript-style UNIX timestamp so we can take
- # advantage of client timezones.
+ # advantage of client time zones.
"create_time": int(time.mktime(self.create_time.timetuple()) * 1000),
"messages": [
{
diff --git a/zerver/openapi/zulip.yaml b/zerver/openapi/zulip.yaml
index e2b7c5db20c..85445fc3571 100644
--- a/zerver/openapi/zulip.yaml
+++ b/zerver/openapi/zulip.yaml
@@ -435,7 +435,7 @@ paths:
- type: object
additionalProperties: false
description: |
- When a user changes their timezone setting.
+ When a user changes their time zone setting.
properties:
user_id:
type: integer
@@ -452,7 +452,7 @@ paths:
timezone:
type: string
description: |
- The new timezone of the user.
+ The new time zone of the user.
- type: object
additionalProperties: false
description: |
@@ -9597,9 +9597,9 @@ paths:
timezone:
type: string
description: |
- The user's [configured timezone](/help/change-your-timezone).
+ The user's [configured time zone](/help/change-your-timezone).
- Timezone values supported by the server are served at
+ Time zone values supported by the server are served at
[/static/generated/timezones.json](/static/generated/timezones.json).
enter_sends:
type: boolean
@@ -10296,8 +10296,8 @@ paths:
and only for clients that did not include `user_settings_object` in
their client_capabilities` when registering the event queue.
- The timezone configured for the user. This is used primarily to display
- the user's timezone to other users.
+ The time zone configured for the user. This is used primarily to display
+ the user's time zone to other users.
See [PATCH /settings](/api/update-settings) for details on
the meaning of this setting.
@@ -12304,9 +12304,9 @@ paths:
- name: timezone
in: query
description: |
- The user's [configured timezone](/help/change-your-timezone).
+ The user's [configured time zone](/help/change-your-timezone).
- Timezone values supported by the server are served at
+ Time zone values supported by the server are served at
[/static/generated/timezones.json](/static/generated/timezones.json).
**Changes**: Before Zulip 5.0 (feature level 80), this setting was managed by
diff --git a/zerver/tests/test_message_send.py b/zerver/tests/test_message_send.py
index dfd8264ff33..a4782aa2698 100644
--- a/zerver/tests/test_message_send.py
+++ b/zerver/tests/test_message_send.py
@@ -1423,7 +1423,7 @@ class ScheduledMessageTest(ZulipTestCase):
self.assertEqual(message.content, "Test message 5")
self.assertEqual(message.delivery_type, ScheduledMessage.REMIND)
- # Scheduling a message while guessing timezone.
+ # Scheduling a message while guessing time zone.
tz_guess = "Asia/Kolkata"
result = self.do_schedule_message(
"stream", "Verona", content + " 6", defer_until_str, tz_guess=tz_guess
@@ -1436,8 +1436,8 @@ class ScheduledMessageTest(ZulipTestCase):
self.assertEqual(message.scheduled_timestamp, convert_to_UTC(utz_defer_until))
self.assertEqual(message.delivery_type, ScheduledMessage.SEND_LATER)
- # Test with users timezone setting as set to some timezone rather than
- # empty. This will help interpret timestamp in users local timezone.
+ # Test with users time zone setting as set to some time zone rather than
+ # empty. This will help interpret timestamp in users local time zone.
user = self.example_user("hamlet")
user.timezone = "US/Pacific"
user.save(update_fields=["timezone"])
diff --git a/zerver/tests/test_populate_db.py b/zerver/tests/test_populate_db.py
index 6ac301babd3..6a86651b4e6 100644
--- a/zerver/tests/test_populate_db.py
+++ b/zerver/tests/test_populate_db.py
@@ -24,7 +24,7 @@ class TestChoosePubDate(ZulipTestCase):
)
-class TestUserTimezones(ZulipTestCase):
+class TestUserTimeZones(ZulipTestCase):
def test_timezones_assigned_to_users(self) -> None:
othello = self.example_user("othello")
self.assertEqual(othello.timezone, "US/Pacific")
diff --git a/zerver/tests/test_signup.py b/zerver/tests/test_signup.py
index a7cc4285113..f5b572a9f78 100644
--- a/zerver/tests/test_signup.py
+++ b/zerver/tests/test_signup.py
@@ -5719,7 +5719,7 @@ class FollowupEmailTest(ZulipTestCase):
# Time offset of America/Phoenix is -07:00
user_profile.timezone = "America/Phoenix"
- # Test date_joined == Friday in UTC, but Thursday in the user's timezone
+ # Test date_joined == Friday in UTC, but Thursday in the user's time zone
user_profile.date_joined = datetime.datetime(
2018, 1, 5, 1, 0, 0, 0, tzinfo=datetime.timezone.utc
)
diff --git a/zerver/tests/test_timestamp.py b/zerver/tests/test_timestamp.py
index b247c28aa3d..d4e20f52168 100644
--- a/zerver/tests/test_timestamp.py
+++ b/zerver/tests/test_timestamp.py
@@ -4,7 +4,7 @@ from dateutil import parser
from zerver.lib.test_classes import ZulipTestCase
from zerver.lib.timestamp import (
- TimezoneNotUTCException,
+ TimeZoneNotUTCException,
ceiling_to_hour,
convert_to_UTC,
datetime_to_timestamp,
@@ -28,7 +28,7 @@ class TestTimestamp(ZulipTestCase):
parser.parse("2017-01-01 00:00:00.123+01:00"),
parser.parse("2017-01-01 00:00:00.123"),
]:
- with self.assertRaises(TimezoneNotUTCException):
+ with self.assertRaises(TimeZoneNotUTCException):
datetime_to_timestamp(dt)
def test_convert_to_UTC(self) -> None:
@@ -43,5 +43,5 @@ class TestTimestamp(ZulipTestCase):
def test_enforce_UTC(self) -> None:
non_utc_datetime = parser.parse("2017-01-01 00:00:00.123")
for function in [floor_to_hour, floor_to_day, ceiling_to_hour, ceiling_to_hour]:
- with self.assertRaises(TimezoneNotUTCException):
+ with self.assertRaises(TimeZoneNotUTCException):
function(non_utc_datetime)
diff --git a/zilencer/management/commands/populate_db.py b/zilencer/management/commands/populate_db.py
index bd64e6616a8..a8405389cd7 100644
--- a/zilencer/management/commands/populate_db.py
+++ b/zilencer/management/commands/populate_db.py
@@ -476,7 +476,7 @@ class Command(BaseCommand):
u.timezone = new_time_zone
u.save(update_fields=["timezone"])
- # Note: Hamlet keeps default timezone of "".
+ # Note: Hamlet keeps default time zone of "".
assign_time_zone_by_delivery_email("[email protected]", "US/Pacific")
assign_time_zone_by_delivery_email("[email protected]", "US/Pacific")
assign_time_zone_by_delivery_email("[email protected]", "US/Eastern")
diff --git a/zproject/computed_settings.py b/zproject/computed_settings.py
index 9d861235ef4..f908a7d2c23 100644
--- a/zproject/computed_settings.py
+++ b/zproject/computed_settings.py
@@ -147,7 +147,7 @@ USE_I18N = True
# calendars according to the current locale.
USE_L10N = True
-# If you set this to False, Django will not use timezone-aware datetimes.
+# If you set this to False, Django will not use time-zone-aware datetimes.
USE_TZ = True
# this directory will be used to store logs for development environment