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.
*/
@ -1491,7 +1490,7 @@ LogUsageChart.prototype.draw = function(container, logData) {
// Create the x-axis domain to encompass a week from today.
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));
}