From 01f2337b625829db4344321a5573db1251f266ae Mon Sep 17 00:00:00 2001 From: Adam Vartanian Date: Thu, 10 May 2012 17:18:48 -0400 Subject: [PATCH] setMilliseconds() doesn't return this. --- dygraph-tickers.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dygraph-tickers.js b/dygraph-tickers.js index b331de8..b9815fe 100644 --- a/dygraph-tickers.js +++ b/dygraph-tickers.js @@ -330,7 +330,8 @@ Dygraph.getDateAxis = function(start_time, end_time, granularity, opts, dg) { // Find a time less than start_time which occurs on a "nice" time boundary // for this granularity. var g = spacing / 1000; - var d = new Date(start_time).setMilliseconds(0); + var d = new Date(start_time); + d.setMilliseconds(0); var x; if (g <= 60) { // seconds x = d.getSeconds(); d.setSeconds(x - x % g); -- 2.7.4