-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any way to remove dependency to New_York timezone data #68
Comments
From my quick test the test can be executed in UTC as well var testDateFormatted = new Intl.DateTimeFormat('en-US', {
hour12: false,
timeZone: 'UTC',
year: 'numeric',
month: '2-digit',
day: '2-digit',
hour: '2-digit',
minute: '2-digit',
second: '2-digit'
}).format(new Date('2014-06-25T00:00:00.123Z'))
var hourCycleSupported =
testDateFormatted === '06/25/2014, 00:00:00' ||
testDateFormatted === '06/25/2014 00:00:00' |
this is very weird, couldn't get this working under IE11 and I don't know why a specific timezone will be a dependency. Currently the IE11 does return the "correct" timezone which is null. |
My issue seems related to this. We are using The logged error when calling
As a side note: The timeZone passed to UPDATE: I was able to reproduce. FF 48 is outdated. The issue doesn't appear with FF 52+. |
In order to fix #38 (works really well BTW) the lib now needs the timezone data for America/New_York because of this
https://github.com/marnusw/date-fns-tz/blob/master/src/_lib/tzTokenizeDate/index.js#L49
In my application I include the bare minimum to make this work on IE11 :
And I am now required to include "tzdata-america-new_york" as well.
I wonder if there is way to make the test of
Intl.DateTimeFormat
API version without depending on any timezone.The text was updated successfully, but these errors were encountered: