people: Remove final use of date-fns-tz.

date-fns-tz does not handle daylight saving time correctly, and can be
replaced with modern browser APIs.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2023-11-17 18:50:33 -08:00
committed by Tim Abbott
parent b897be76b4
commit 8a875b119f
7 changed files with 15 additions and 68 deletions

View File

@@ -43,7 +43,7 @@ type DateOrTimeFormat = DateFormat | TimeFormat | DateWithTimeFormat;
// for any formats that display the name for a month/weekday, but
// possibly in more subtle ways for languages with different
// punctuation schemes for date and times.
function get_format_options_for_type(type: DateOrTimeFormat): Intl.DateTimeFormatOptions {
export function get_format_options_for_type(type: DateOrTimeFormat): Intl.DateTimeFormatOptions {
const is_twenty_four_hour_time = user_settings.twenty_four_hour_time;
const time_format_options: Intl.DateTimeFormatOptions = is_twenty_four_hour_time