Skip to content

Commit

Permalink
chore: DateTimeGeneratorSpec could fail on millisecond boundaries
Browse files Browse the repository at this point in the history
  • Loading branch information
rholshausen committed Jul 20, 2023
1 parent 5133241 commit 308a7f7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import spock.lang.Specification
import java.time.LocalDateTime
import java.time.OffsetDateTime
import java.time.ZoneOffset
import java.time.format.DateTimeFormatter

@SuppressWarnings('LineLength')
class DateTimeGeneratorSpec extends Specification {
Expand Down Expand Up @@ -35,7 +36,7 @@ class DateTimeGeneratorSpec extends Specification {

expect:
DateTimeGenerator.@Companion.fromJson(json).generate([baseDateTime: baseWithOffset], null) ==
baseDateTime.toString()
baseDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
}

def 'supports timezones with zone IDs'() {
Expand Down

0 comments on commit 308a7f7

Please sign in to comment.