diff --git a/src/backend/build.gradle.kts b/src/backend/build.gradle.kts index d1b28482d1..2813fe9475 100644 --- a/src/backend/build.gradle.kts +++ b/src/backend/build.gradle.kts @@ -52,8 +52,6 @@ allprojects { } dependencies { dependency("com.github.zafarkhaja:java-semver:${Versions.JavaSemver}") - dependency("org.apache.skywalking:apm-toolkit-logback-1.x:${Versions.SkyWalkingApmToolkit}") - dependency("org.apache.skywalking:apm-toolkit-trace:${Versions.SkyWalkingApmToolkit}") dependency("net.javacrumbs.shedlock:shedlock-spring:${Versions.Shedlock}") dependency("net.javacrumbs.shedlock:shedlock-provider-mongo:${Versions.Shedlock}") dependency("com.google.code.gson:gson:${Versions.Gson}") diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/AbstractChartService.kt b/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/AbstractChartService.kt index 8cb406af4f..bd1516b701 100644 --- a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/AbstractChartService.kt +++ b/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/AbstractChartService.kt @@ -115,7 +115,6 @@ import org.slf4j.LoggerFactory import org.springframework.beans.factory.annotation.Autowired import org.springframework.cloud.client.circuitbreaker.NoFallbackAvailableException import java.time.LocalDateTime -import java.time.format.DateTimeFormatter import java.util.SortedSet import java.util.concurrent.ThreadPoolExecutor @@ -361,7 +360,7 @@ open class AbstractChartService : ArtifactService() { "/${chartMetadata.name}-${chartMetadata.version}.tgz" ) ) - chartMetadata.created = convertDateTime(nodeMap[NODE_CREATE_DATE] as String) + chartMetadata.created = TimeFormatUtil.convertToUtcTime(nodeMap[NODE_CREATE_DATE] as LocalDateTime) chartMetadata.digest = nodeMap[NODE_SHA256] as String return chartMetadata } @@ -711,10 +710,5 @@ open class AbstractChartService : ArtifactService() { const val PAGE_NUMBER = 0 const val PAGE_SIZE = 200000 const val V2_PAGE_SIZE = 20000 - - fun convertDateTime(timeStr: String): String { - val localDateTime = LocalDateTime.parse(timeStr, DateTimeFormatter.ISO_DATE_TIME) - return TimeFormatUtil.convertToUtcTime(localDateTime) - } } } diff --git a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/ChartRepositoryServiceImpl.kt b/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/ChartRepositoryServiceImpl.kt index eeca8f4174..5fe7c90c17 100644 --- a/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/ChartRepositoryServiceImpl.kt +++ b/src/backend/helm/biz-helm/src/main/kotlin/com/tencent/bkrepo/helm/service/impl/ChartRepositoryServiceImpl.kt @@ -305,7 +305,7 @@ class ChartRepositoryServiceImpl( helmProperties.domain, "$projectId/$repoName/charts/$chartName-$chartVersion.tgz" ) ) - chartMetadata.created = convertDateTime(it[NODE_CREATE_DATE] as String) + chartMetadata.created = TimeFormatUtil.convertToUtcTime(it[NODE_CREATE_DATE] as LocalDateTime) chartMetadata.digest = it[NODE_SHA256] as String ChartParserUtil.addIndexEntries(indexYamlMetadata, chartMetadata) } catch (ex: HelmFileNotFoundException) {