Commit bc05b4f9 authored by Mark Chao's avatar Mark Chao

Fix merge request analytics chart data

Fix throughput_chart_query_builder_spec.js
Due to we use current date as prototype, and manipulate month first to
get a date object, on 31st, when we move to a month with only 30 days,
the month will increase unintentionally.
parent 7a9c83cd
......@@ -702,13 +702,7 @@ export const approximateDuration = (seconds = 0) => {
* @return {Date} the date object from the params
*/
export const dateFromParams = (year, month, day) => {
const date = new Date();
date.setFullYear(year);
date.setMonth(month);
date.setDate(day);
return date;
return new Date(year, month, day);
};
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment