Timezone helper links
This commit is contained in:
parent
a3666930a0
commit
87b36e417d
|
|
@ -366,6 +366,22 @@ const Event = (props) => {
|
||||||
onChange={event => setTimezone(event.currentTarget.value)}
|
onChange={event => setTimezone(event.currentTarget.value)}
|
||||||
options={timezones}
|
options={timezones}
|
||||||
/>
|
/>
|
||||||
|
{event?.timezone && event.timezone !== timezone && <p>This event was created in the timezone <strong>{event.timezone}</strong>. <a href="#" onClick={e => {
|
||||||
|
e.preventDefault();
|
||||||
|
setTimezone(event.timezone);
|
||||||
|
}}>Click here</a> to use it.</p>}
|
||||||
|
{((
|
||||||
|
Intl.DateTimeFormat().resolvedOptions().timeZone !== timezone
|
||||||
|
&& (event?.timezone && event.timezone !== Intl.DateTimeFormat().resolvedOptions().timeZone)
|
||||||
|
) || (
|
||||||
|
event?.timezone === undefined
|
||||||
|
&& Intl.DateTimeFormat().resolvedOptions().timeZone !== timezone
|
||||||
|
)) && (
|
||||||
|
<p>Your local timezone is detected to be <strong>{Intl.DateTimeFormat().resolvedOptions().timeZone}</strong>. <a href="#" onClick={e => {
|
||||||
|
e.preventDefault();
|
||||||
|
setTimezone(Intl.DateTimeFormat().resolvedOptions().timeZone);
|
||||||
|
}}>Click here</a> to use it.</p>
|
||||||
|
)}
|
||||||
</StyledMain>
|
</StyledMain>
|
||||||
</LoginSection>
|
</LoginSection>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue