Commit a64de1fd authored by elebourgeois's avatar elebourgeois
Browse files

Fix calculation of jobID date

parent a62795c2
......@@ -11,7 +11,7 @@ export function convertJIDToDate(jid) {
const date = new Date();
date.setUTCFullYear(d.year);
date.setUTCMonth(d.month);
date.setUTCMonth(d.month - 1);
date.setUTCDate(d.day);
date.setUTCHours(d.hours);
date.setUTCMinutes(d.minutes);
......@@ -19,4 +19,4 @@ export function convertJIDToDate(jid) {
return date;
}
\ No newline at end of file
}
......@@ -7,7 +7,7 @@ it('should convert a JID to a Date', () => {
const date = convertJIDToDate(jid);
expect(date.getUTCFullYear()).toBe(2018);
expect(date.getUTCMonth()).toBe(4);
expect(date.getUTCMonth()).toBe(3);
expect(date.getUTCDate()).toBe(25);
expect(date.getUTCHours()).toBe(11);
expect(date.getUTCMinutes()).toBe(13);
......
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