-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
dc.js 3.0 test suit does not like Stockholm #1420
Comments
All of our tests should run in |
I think all of these should be $ grep d3\.time[A-Z] spec/*
spec/bar-chart-spec.js: var expectedStartDate = d3.timeDay.offset(date, -10);
spec/bar-chart-spec.js: var expectedEndDate = d3.timeDay.offset(date, 10);
spec/bar-chart-spec.js: var expectedStartDate = d3.timeMonth.offset(date, -2);
spec/bar-chart-spec.js: var expectedEndDate = d3.timeMonth.offset(date, 2);
spec/biggish-data-spec.js: row.day = d3.timeDay(row.dd);
spec/biggish-data-spec.js: row.hour = d3.timeHour(row.dd);
spec/biggish-data-spec.js: extentDay[1] = d3.timeDay.offset(extentDay[1], 1);
spec/biggish-data-spec.js: .xUnits(d3.timeHours);
spec/biggish-data-spec.js: .xUnits(d3.timeHours)
spec/biggish-data-spec.js: .round(d3.timeHour.round) These come from more recent tests in 9e66f33 and 875288b that I wrote after the great and painful UTC conversion some years back. |
But those aren't failing. (@kum-deepak, please quote the specific test when reporting a test failure.) Setting my clock to Oslo I'm seeing this one fail instead:
It's from around the same time as the bar chart spec, also to do with padding units. |
Interesting! It's a bug in the time padding itself. We have // convert 'day' to 'timeDay' and similar
dc.utils.toTimeFunc = function (t) {
return 'time' + t.charAt(0).toUpperCase() + t.slice(1);
}; I can fix the test by changing Although this dynamic search for time functions is kind of fishy in itself... shouldn't the padding unit be the time interval object, rather than the name of it? |
Wow! I did not expect such quick response. I had created the issue as a marker at an airport. This code is new, earlier it was directly calling that function by name. I converted it as the function names changed in D3v4. I am not entirely sure what is correct behavior here. We can keep it configurable, but setting the correct default will be crucial as majority of the users will not change the default. |
@kum-deepak, do you happen to be in Stockholm, or were you just messing with time zones? This is fixed in 3.0 alpha 11. |
The first time I discovered the problem of testing in multiple time zones, it was such a nightmare that seeing this, I wanted to defeat it immediately! |
I am actually in Stockholm for today 😄 |
these may be harmless but we should consistently use UTC in all tests for #1420
It does not like Paris and London as well. 😄
One date related test case fails.
The text was updated successfully, but these errors were encountered: