diff --git a/lib/modules/datasource/artifactory/__fixtures__/releases-as-files.html b/lib/modules/datasource/artifactory/__fixtures__/releases-as-files.html
index 2bdde583999c96..3d5bf59b799634 100644
--- a/lib/modules/datasource/artifactory/__fixtures__/releases-as-files.html
+++ b/lib/modules/datasource/artifactory/__fixtures__/releases-as-files.html
@@ -11,9 +11,9 @@
Index
..
1.0.0 21-Jul-2021 20:08 -
- 1.0.1 23-Aug-2021 20:03 -
- 1.0.2 21-Jul-2021 20:09 -
- 1.0.3 06-Feb-2021 09:54 -
+ 1.0.1 23-Aug-2021 20:03 12 MB
+ 1.0.2 21-Jul-2021 20:09 123.45 GB
+ 1.0.3 06-Feb-2021 09:54 9.0 KB
Artifactory Port 8080
diff --git a/lib/modules/datasource/artifactory/index.ts b/lib/modules/datasource/artifactory/index.ts
index e66ffb4ebaac59..ef44fdb401bba8 100644
--- a/lib/modules/datasource/artifactory/index.ts
+++ b/lib/modules/datasource/artifactory/index.ts
@@ -1,3 +1,4 @@
+import { DateTime } from 'luxon';
import { logger } from '../../../logger';
import { cache } from '../../../util/cache/package/decorator';
import { parse } from '../../../util/html';
@@ -114,6 +115,11 @@ export class ArtifactoryDatasource extends Datasource {
}
private static parseReleaseTimestamp(rawText: string): string {
- return rawText.trim().replace(regEx(/ ?-$/), '') + 'Z';
+ return (
+ rawText
+ .split(regEx(/\s{2,}/))
+ .filter((e) => DateTime.fromFormat(e, 'dd-LLL-yyyy HH:mm').isValid)[0] +
+ 'Z'
+ );
}
}