Correctly parse the date of artifact expiring

Previously it was just replacing dashes which would remove the timezone offset causing the date to be invalid

Closes #19600
This commit is contained in:
Phil Hughes 2016-10-05 16:02:52 +01:00
parent 796f531f2b
commit ea2f9a6083

View file

@ -146,7 +146,7 @@
$date = $('.js-artifacts-remove');
if ($date.length) {
date = $date.text();
return $date.text($.timefor(new Date(date.replace(/-/g, '/')), ' '));
return $date.text($.timefor(new Date(date.replace(/([0-9]+)-([0-9]+)-([0-9]+)/g, '$1/$2/$3')), ' '));
}
};