AWSDateTime doesn't parse ISO 8601 format, is it bug ?

0

Summary

"2019-04-09T23:25:27+09:00" is valid ISO 8601 datetime notation certainly.
"2019-04-09T23:25:27+0900" (colon-less timezone) is also valid I think (https://en.wikipedia.org/wiki/ISO_8601 says so, but it is just my conjecture because I don't have ISO 8601 cannonical specification pdf https://www.iso.org/iso-8601-date-and-time-format.html.)

AWSDateTime accepts former, but denied latter.
I think this is bug because https://docs.aws.amazon.com/appsync/latest/devguide/scalars.html#awsdatetime says:

The AWSDateTime scalar type represents a valid extended ISO 8601 DateTime string.

How to reproduce

  1. Setup AppSync with Dynamodb backend
  2. Use AWSDateTime as part of GraphQL type
  3. Insert a row with value "2019-04-09T23:25:27+0900" for AWSDateTime in dynamodb console
  4. Query in AppSync console to get the row
  5. Error happens like invalid row value

P.S.

I haven't checked AWSTime but It may have same problem.

질문됨 6년 전1587회 조회
1개 답변
0
수락된 답변

Hi,

Thanks for the feedback. At this time, AWS AppSync requires the colon in the timezone. Per our documentation, "...the time zone offset must either be Z (representing the UTC time zone) or be in the format ±hh:mm:ss" (https://docs.aws.amazon.com/appsync/latest/devguide/scalars.html#awsdatetime).

I'll add a task to our backlog to see if we can relax this requirement to support timezones without colons. Unfortunately, I cannot provide an ETA on if/when this can be implemented.

Regards,
Rohan

답변함 5년 전
profile picture
전문가
검토됨 3달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인