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

validate address should allow addresslabel in place of street + number, fix timezone json conversion issues. #371

Conversation

ShiCheng-Lu
Copy link
Contributor

@ShiCheng-Lu ShiCheng-Lu commented Jul 31, 2024

@ShiCheng-Lu ShiCheng-Lu requested a review from lmeier July 31, 2024 16:59
@ShiCheng-Lu ShiCheng-Lu changed the title Shicheng/fence 2045 validate address should allow addresslabel in addition to validate address should allow addresslabel in place of street + number, fix timezone json conversion issues. Jul 31, 2024
@@ -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];
Copy link
Contributor Author

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;
Copy link
Contributor Author

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;
Copy link
Contributor

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.

Copy link
Contributor

@KennyHuRadar KennyHuRadar left a 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?

@ShiCheng-Lu ShiCheng-Lu merged commit 991888a into master Oct 24, 2024
2 checks passed
@ShiCheng-Lu ShiCheng-Lu deleted the shicheng/fence-2045-validate-address-should-allow-addresslabel-in-addition-to branch October 24, 2024 19:40
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