Skip to content

Conversation

@raphkim
Copy link
Contributor

@raphkim raphkim commented Jul 17, 2020

Issue #, if available:

Description of changes:
Add TimestampFormat enum to be passed to the unmarshaller to more accurately unmarshall date strings.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@raphkim raphkim requested a review from a team July 17, 2020 07:10
@raphkim raphkim self-assigned this Jul 17, 2020
@raphkim raphkim added core Issues with the AWS Android Core library Pull Request labels Jul 17, 2020
@raphkim raphkim changed the title feat: Differentiate between timestamp formats in json unmarshaller feat: differentiate between timestamp formats in json unmarshaller Jul 17, 2020
Copy link
Contributor

@TrekSoft TrekSoft left a comment

Choose a reason for hiding this comment

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

Approved pending minor formatting comment.

Cat23u1

@raphkim raphkim merged commit 59adfd6 into aws-amplify:develop Jul 17, 2020
@raphkim raphkim deleted the date-unmarshaller-patch branch July 17, 2020 16:25
Number number = NumberFormat.getInstance(new Locale("en")).parse(dateString);
return new Date(number.longValue() * DATE_MULTIPLIER);
} catch (ParseException e) {
switch (format) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh okay nice. This is a clean solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues with the AWS Android Core library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants