Aws-sdk-net: DateTime properties unmarshalled as Local times

Created on 5 Mar 2019  路  1Comment  路  Source: aws/aws-sdk-net

https://github.com/aws/aws-sdk-net/blob/08c86fce10f9d4ef520d3f3ad23d71500d049165/sdk/src/Core/Amazon.Runtime/Internal/Transform/SimpleTypeUnmarshaller.cs#L399

From the documentation

If s contains time zone information, this method returns a DateTime value whose Kind property is DateTimeKind.Local and converts the date and time in s to local time. Otherwise, it performs no time zone conversion and returns a DateTime value whose Kind property is DateTimeKind.Unspecified.

You can see an example of this in S3Object.LastModified returned from ListObjectsV2Async. The values returned have DateTimeKind.Local, but the documentation comment on this property says:

The date retrieved from S3 is in ISO8601 format. A GMT formatted date is passed back to the user.

Will you please change the DateTimeUnmarshaller to avoid converting the returned string to local time?

breaking-change bug modulsdk-core p1

Most helpful comment

Hi @wjrogers, thank you for reporting this. I have confirmed that it is an issue, but I'm unsure if we're going to be able to provide a fix until we produce another major version because there will be an issue with backwards compatibility. We could extend the documentation, but we can't totally replace that either because the response from GetObject correctly returns the UTC time. I'll bring this up with the team and see if there is anything we can do for a workaround.

>All comments

Hi @wjrogers, thank you for reporting this. I have confirmed that it is an issue, but I'm unsure if we're going to be able to provide a fix until we produce another major version because there will be an issue with backwards compatibility. We could extend the documentation, but we can't totally replace that either because the response from GetObject correctly returns the UTC time. I'll bring this up with the team and see if there is anything we can do for a workaround.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ShahriatHossain picture ShahriatHossain  路  4Comments

AlfredoDiaz90 picture AlfredoDiaz90  路  4Comments

jc1001 picture jc1001  路  4Comments

jefhai picture jefhai  路  5Comments

imkheong picture imkheong  路  3Comments