diff --git a/keel-core-test/src/main/kotlin/com/netflix/spinnaker/keel/persistence/ArtifactRepositoryTests.kt b/keel-core-test/src/main/kotlin/com/netflix/spinnaker/keel/persistence/ArtifactRepositoryTests.kt index 0ed764fce..ef920c082 100644 --- a/keel-core-test/src/main/kotlin/com/netflix/spinnaker/keel/persistence/ArtifactRepositoryTests.kt +++ b/keel-core-test/src/main/kotlin/com/netflix/spinnaker/keel/persistence/ArtifactRepositoryTests.kt @@ -653,7 +653,7 @@ abstract class ArtifactRepositoryTests : JUnit5Minutests // We truncate this since we're using a serialization to java that reduces the level of precision // and later comparisons break otherwise. This is needed to work with generated columns in // certain databases. See the PrecisionSqlSerializer class for more info - val createdAt = Instant.now().truncatedTo(ChronoUnit.MILLIS) + val createdAt = Instant.now().truncatedTo(ChronoUnit.MICROS) before { subject.register(versionedSnapshotDebian) diff --git a/keel-core/src/main/java/com/netflix/spinnaker/keel/serialization/PrecisionSqlSerializer.java b/keel-core/src/main/java/com/netflix/spinnaker/keel/serialization/PrecisionSqlSerializer.java index 79dcd5c5d..cdfaeaaae 100644 --- a/keel-core/src/main/java/com/netflix/spinnaker/keel/serialization/PrecisionSqlSerializer.java +++ b/keel-core/src/main/java/com/netflix/spinnaker/keel/serialization/PrecisionSqlSerializer.java @@ -22,7 +22,7 @@ *
  • https://stackoverflow.com/a/38042457 for more information. * * - *

    NOTE we're going to 3 digits, but could go to 6 if but NO larger than 6 due to NOTE we're going to 6 digits to match Mysql str_to_date function * limits on microseconds parsing. This is used in the SQL definition: * add column triggered_at datetime(3) generated always as (str_to_date(json->>'$.triggeredAt', '%Y-%m-%dT%T.%fZ'))