Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3: Format x-amz-date with year-of-era #679

Merged
merged 1 commit into from Dec 31, 2017

Conversation

guersam
Copy link
Contributor

@guersam guersam commented Dec 31, 2017

"YYYY" in DateTimeFormatter.ofPattern("YYYYMMdd") means
week-based-year, which formats LocalDate.of(2017, 12, 31) as
"20181231" and results in unexpected rejections from S3 as below:

The difference between the request time and the current time is too large.

Replacing it with "yyyy" fixes the bug.

"YYYY" in `DateTimeFormatter.ofPattern("YYYYMMdd")` means
week-based-year, which formats `LocalDate.of(2017, 12, 31)` as
"20181231" and results in unexpected rejections from S3 as below:

> The difference between the request time and the current time is
too large.

Replacing it with "yyyy" fixes the bug.
@ktoso
Copy link
Member

ktoso commented Dec 31, 2017

Resolves #680

Copy link
Member

@ktoso ktoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for providing the fix so quickly.
Seems the YYYY format indeed is wrong, here's a quick summary for bystanders: http://www.juandebravo.com/2015/04/10/java-yyyy-date-format

@ktoso ktoso merged commit 3ab123e into akka:master Dec 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants