-
I'm trying to handle a case where a datetime I'm passing to FormattedDate does not have a time zone associated with it (ie, no 'Z' at the end). In this example, even though the context value correctly reads <IntlProvider locale={"en"} timeZone="PST">
<IntlContext.Consumer>
{(context) => context.timeZone}
{/*correctly displays 'PST'*/}
</IntlContext.Consumer>
<div>
<FormattedDate
value={"2021-03-01T12:00"}
timeZone="UTC"
day="numeric"
month="short"
year="numeric"
hour="numeric"
minute="2-digit"
/>
{/* converts to UTC from EST??*/}
</div>
</IntlProvider> I would've expected it to use PST or UTC. Is there a way to set this? |
Beta Was this translation helpful? Give feedback.
Answered by
longlho
Nov 16, 2021
Replies: 1 comment 1 reply
-
We just use native browser date parser and it's known to be inconsistent. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
longlho
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We just use native browser date parser and it's known to be inconsistent.