Closed sailrish closed 8 years ago
@cmswalker and @katylava: would you please review this? This should address #27, and is similar to #28.
This looks great, mind updating the README with this info? If you dont have the time, let me know and I will, but I say this PR looks good to go, thank you!
Thanks @cmswalker. I have updated the readme, and I'm now merging this PR. I have one more pending change related to a timeout option for shipping carrier objects. Once that's done too, I'll release a new version to NPM. Thanks for your help. And @katylava thanks for bringing this issue to my attention, and identifying the incorrect test case.
Sorry I didn't reply in a timely fashion. Thanks for the fix!
Most shipping carriers have activities with time data along with location and a description of the event, like this:
But the time information is sometimes a
timestamp
, and sometimes only adatetime
. The distinction between the two is that a timestamp contains timezone information (such as in the fedex example above, in the form of a UTC offset-04:00
). The only two carriers that provide a timezone-rich timestamp are FedEx and A1 International. This PR updates the implementation for those two carriers to return both a timestamp and a datetime field in all the activities of a shipment.Here's what the output for a fedex shipment will now look like (notice the
datetime
field which represents the local time at the location specified in the activity):