Skip to content

testBindInstantFromJavaUtilDate fails on systems in the Pacific/Auckland time zone [SPR-16534] #21077

@spring-projects-issues

Description

@spring-projects-issues

William Hoyle opened SPR-16534 and commented

The DateTimeFormattingTests.testBindInstantFromJavaUtilDate test fails if run on a machine with a default time zone of "Pacific/Auckland" (UTC+12/13 depending on the time of year).

To reproduce:

Force the time zone in spring-context/spring-context.gradle:

test {
    systemProperty 'user.timezone', 'Pacific/Auckland'
}

Run the test:

./gradlew :spring-context:test --tests org.springframework.format.datetime.standard.DateTimeFormattingTests

Results in:

> Task :spring-context:test FAILED

org.springframework.format.datetime.standard.DateTimeFormattingTests > testBindInstantFromJavaUtilDate FAILED
    java.lang.AssertionError at DateTimeFormattingTests.java:366

Affects: 4.3.14, 5.0.4

Referenced from: commits 7d89de0, 8181c02

Backported to: 4.3.15

Metadata

Metadata

Assignees

Labels

status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions