]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-17440 Drop seconds from QP name when it is no longer built-in
authorJacek <jacek.poreda@sonarsource.com>
Tue, 11 Oct 2022 07:52:22 +0000 (09:52 +0200)
committersonartech <sonartech@sonarsource.com>
Wed, 12 Oct 2022 20:03:43 +0000 (20:03 +0000)
server/sonar-webserver-webapi/src/main/java/org/sonar/server/qualityprofile/RegisterQualityProfiles.java
server/sonar-webserver-webapi/src/test/java/org/sonar/server/qualityprofile/RegisterQualityProfilesTest.java

index e4a1ba8e2ba4f9f9d210722023dd30ffbc96ca16..b9f0dd2b554a68e019f42aa05798582585c521f5 100644 (file)
@@ -239,7 +239,7 @@ public class RegisterQualityProfiles implements Startable {
    */
   private String generateNewProfileName(RulesProfileDto qProfileDto) {
     var shortName = StringUtils.abbreviate(qProfileDto.getName(), 40);
-    DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MMMM dd yyyy 'at' hh:mm:ss a")
+    DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MMMM dd yyyy 'at' hh:mm a")
       .withLocale(Locale.getDefault())
       .withZone(ZoneId.systemDefault());
     var now = formatter.format(Instant.ofEpochMilli(system2.now()));
index 574014609058fd6419a5973e12d5062c73a41eb6..b51ffcf770446097137fdaeafb13fd45eef21057 100644 (file)
@@ -222,7 +222,7 @@ public class RegisterQualityProfilesTest {
 
     underTest.start();
 
-    DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MMMM dd yyyy 'at' hh:mm:ss a")
+    DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MMMM dd yyyy 'at' hh:mm a")
       .withLocale(Locale.getDefault())
       .withZone(ZoneId.systemDefault());