Make sure the graph uses UTC date range

This commit is contained in:
Joseph Schorr 2013-12-03 20:08:02 -05:00
parent fc7d319c7c
commit d80015276b

View file

@ -1274,7 +1274,6 @@ function LogUsageChart(titleMap) {
this.colorScale_ = d3.scale.category20();
}
/**
* Builds the D3-representation of the data.
*/
@ -1489,9 +1488,9 @@ LogUsageChart.prototype.draw = function(container, logData) {
chart.multibar.delay(0);
// Create the x-axis domain to encompass a week from today.
var domain = [];
var domain = [];
var datetime = new Date();
datetime = new Date(datetime.getFullYear(), datetime.getMonth(), datetime.getDate());
datetime = new Date(datetime.getUTCFullYear(), datetime.getUTCMonth(), datetime.getUTCDate());
for (var i = 7; i >= 0; --i) {
domain.push(offsetDate(datetime, -1 * i));
}