Closed adelevie closed 9 years ago
I pulled in another PR that failed to update the test. Best assumption I have is that Typhoeus changed their timeout API at some point in the last 5 years.
It's covered here: https://github.com/adelevie/usps/commit/cc630d7ecb2c301ce82d895c4381291a1ce41a12
Just waiting for Travis to finish doing its thing.
While setting the time zone fixes the errors it introduces the issue where code functions differently in different time zones. A common case of this is on the server where the timezone is usually UTC (where your code actually runs) or if someone is using the gem in Pacific, Mountain, or even South African Standard Time.
Would setting a config variable solve this?
Of the two failing time zone tests I think the first one could be standardized so we're dealing with the time zone properly.
Unfortunately I don't have a good answer for the second case (TrackingDetail) since the API doesn't report a time zone and does not specify if it is in UTC or if it is in the time zone of the address where it was received. We could just treat all times as being in UTC unless a timezone is specified.
Just change some hard-coded string/int somewhere?