bcuff / elasticsearch-net-aws

Add-on to Elasticsearch.Net & NEST for using AWS's elasticsearch service.
Apache License 2.0
72 stars 27 forks source link

Signing with InvariantCulture, so different calendars produce good ou… #63

Closed janireu closed 3 years ago

janireu commented 3 years ago

…tput.

For example, in Thailand they are 543 years ahead, when formatting a date using date.ToString("yyyyMMdd") , it will produce 25640129. The library needs to format using the invariant culture to avoid issues with different calendars falling out of sync with AWS.

The test is not great but I've included it so the issue is easy to reproduce. To make it more elegant I would need to extract DateTime.UtcNow from SignV4Util.cs which it's quite a bigger change.

bcuff commented 3 years ago

Ahh thank you for the fix! I'll test things out on my end and publish a new package if it all checks out.

bcuff commented 3 years ago

@janireu published here - https://www.nuget.org/packages/Elasticsearch.Net.Aws/7.0.6

janireu commented 3 years ago

Thanks a lot for the speedy review and publishing 👍