-
Notifications
You must be signed in to change notification settings - Fork 27
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
validate address should allow addresslabel in place of street + number, fix timezone json conversion issues. #371
Conversation
@@ -56,7 +67,7 @@ - (NSDictionary *)dictionaryValue { | |||
dict[@"_id"] = self._id; | |||
dict[@"name"] = self.name; | |||
dict[@"code"] = self.code; | |||
dict[@"currentTime"] = self.currentTime; | |||
dict[@"currentTime"] = [timezoneDateFormatter() stringFromDate:self.currentTime]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the current time string from server is a different format (no millisecond) so we need a different parser than RadarUtils.isoDateFormatter
@@ -89,7 +89,7 @@ - (NSDictionary *)dictionaryValue { | |||
dict[kDestinationGeofenceTag] = self.destinationGeofenceTag; | |||
dict[kDestinationGeofenceExternalId] = self.destinationGeofenceExternalId; | |||
dict[kMode] = [Radar stringForMode:self.mode]; | |||
dict[kScheduledArrivalAt] = self.scheduledArrivalAt; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NSDate object does not get converted, this field was null, format it to string since all our other date formats are converted to string with JSON
@@ -8,6 +8,16 @@ | |||
#import "RadarTimeZone.h" | |||
#import "RadarUtils.h" | |||
|
|||
NSDateFormatter *_timezoneDateFormatter = nil; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably there no action items for with respect to this PR, but we really should consider having a more "central" place where we define our time parsers. There are quite a few definitions littered around the codebase. Just a call out to keep in mind for the future.
…d-allow-addresslabel-in-addition-to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, wait for @liam to take a pass too?
…d-allow-addresslabel-in-addition-to
…d-allow-addresslabel-in-addition-to
…d-allow-addresslabel-in-addition-to
https://linear.app/radarlabs/issue/FENCE-2045/validate-address-should-allow-addresslabel-in-addition-to-street
also:
https://linear.app/radarlabs/issue/FENCE-2044/some-dictionaryvalues-does-not-convert-nsdate-to-string-properly
all tested with example app with each producing the correct outputs when converted to JSON.