Pull request: add etc timezones to the timezone list

Updates #6568

Squashed commit of the following:

commit cea0e9143eb1322d359fdb611ea7572431fef623
Merge: 6f4a5b162 b42063ee8
Author: Ildar Kamalov <ik@adguard.com>
Date:   Thu Dec 28 13:40:47 2023 +0300

    Merge branch 'master' into ADG-7953

commit 6f4a5b1629c2e9cffdc23292af8c1319fdd461f1
Merge: c574e3f52 d75712bb9
Author: Ildar Kamalov <ik@adguard.com>
Date:   Wed Dec 27 16:29:53 2023 +0300

    Merge branch 'master' into ADG-7953

commit c574e3f52a73f39044b333a2857a11a23ca997a8
Author: Ildar Kamalov <ik@adguard.com>
Date:   Wed Dec 27 09:52:20 2023 +0300

    ADG-7953 add etc timezones to the timezones list
This commit is contained in:
Ildar Kamalov
2023-12-28 16:27:01 +03:00
parent b42063ee86
commit bec3cab56c
4 changed files with 24 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
import React from 'react';
import timezones from 'timezones-list';
import ct from 'countries-and-timezones';
import { useTranslation } from 'react-i18next';
import PropTypes from 'prop-types';
@@ -15,6 +15,8 @@ export const Timezone = ({
setTimezone(event.target.value);
};
const timezones = ct.getAllTimezones();
return (
<div className="schedule__timezone">
<label className="form__label form__label--with-desc mb-2">
@@ -30,9 +32,9 @@ export const Timezone = ({
{t('schedule_timezone')}
</option>
{/* TODO: get timezones from backend method when the method is ready */}
{timezones.map((zone) => (
<option key={zone.name} value={zone.tzCode}>
{zone.label}
{Object.keys(timezones).map((zone) => (
<option key={zone} value={zone}>
{zone} (GMT{timezones[zone].utcOffsetStr})
</option>
))}
</select>