Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2a57525

Browse filesBrowse files
committed
temp fix for histogram2d test in UTC environment
1 parent b4da924 commit 2a57525
Copy full SHA for 2a57525

File tree

Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed

‎test/jasmine/tests/histogram2d_test.js

Copy file name to clipboardExpand all lines: test/jasmine/tests/histogram2d_test.js
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,10 @@ describe('Test histogram2d', function() {
7575
return out;
7676
}
7777

78-
// remove tzOffset when we move to UTC
79-
var oneDay = 24 * 3600000;
78+
// remove tzJan/tzJuly when we move to UTC
79+
var oneDay = 24 * 3600000,
80+
tzJan = (new Date(1970, 0, 1)).getTimezoneOffset(),
81+
tzJuly = (new Date(1970, 6, 1)).getTimezoneOffset();
8082

8183
it('should handle both uniform and nonuniform date bins', function() {
8284
var out = _calc({
@@ -95,7 +97,7 @@ describe('Test histogram2d', function() {
9597
// lets also make it display the bins with nonuniform size,
9698
// and ensure we don't generate an extra bin on the end (see
9799
// first row of z below)
98-
expect(out.y0).toBe('1969-07-02 15:24');
100+
expect(out.y0).toBe(tzJan === tzJuly ? '1969-07-02 14:24' : '1969-07-02 15:24');
99101
expect(out.dy).toBe(365.2 * oneDay);
100102

101103
expect(out.z).toEqual([

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.