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

Fix showing IAMS past stop time #841

Merged
merged 2 commits into from
Dec 22, 2020
Merged

Conversation

emawby
Copy link
Contributor

@emawby emawby commented Dec 22, 2020

This change involves reading in end_time from JSON when creating an IAM
so that we can decide to not show the IAM (Cached case) if the IAM
should be finished. The date comes in iso8601 format so I added a
NSDateFormatter category with that format to easily retrieve it.
Note we cannot use the Apple provided iso8601 date formatter class until
we drop iOS 9 support.

This change is Reviewable

This change involves reading in end_time from JSON when creating an IAM
so that we can decide to not show the IAM (Cached case) if the IAM
should be finished. The date comes in iso8601 format so I added a
NSDateFormatter category with that format to easily retrieve it.
Note we cannot use the Apple provided iso8601 date formatter class until
we drop iOS 9 support.

if (json[@"end_time"] && [json[@"end_time"] isKindOfClass:[NSString class]]) {
NSString *stringEndTime = json[@"end_time"];
NSDateFormatter *dateFormatter = [NSDateFormatter iso8601DateFormatter];
Copy link
Contributor

Choose a reason for hiding this comment

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

can we have this object on Android too?

@emawby emawby merged commit fc3ba57 into master Dec 22, 2020
@emawby emawby deleted the fix/showing_iams_past_stop_time branch December 22, 2020 20:51
@emawby emawby mentioned this pull request Dec 24, 2020
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.

2 participants