Skip to content

Conversation

@im-abeer
Copy link
Contributor

All datetime fields in the models are now parsed to org.joda.time.DateTime in UTC. This is set as a convention to avoid any inconsistencies in the timezone sent in the v2 API. DateTimeUtils.parseISODateTimeString will automatically detect the timezone in datetime string and return a DateTime object, given that the string is in ISO8601 format.

Signed-off-by: Abeer abeer.u@instamojo.com

@im-abeer im-abeer requested a review from vijithv January 10, 2019 10:16
@codecov
Copy link

codecov bot commented Jan 10, 2019

Codecov Report

Merging #26 into master will increase coverage by 0.08%.
The diff coverage is 61.53%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #26      +/-   ##
============================================
+ Coverage     49.73%   49.82%   +0.08%     
- Complexity      143      145       +2     
============================================
  Files            19       21       +2     
  Lines           575      584       +9     
  Branches         25       27       +2     
============================================
+ Hits            286      291       +5     
- Misses          270      273       +3     
- Partials         19       20       +1
Impacted Files Coverage Δ Complexity Δ
...main/java/com/instamojo/wrapper/model/Invoice.java 35% <ø> (ø) 7 <0> (ø) ⬇️
.../main/java/com/instamojo/wrapper/model/Refund.java 34.61% <ø> (ø) 9 <0> (ø) ⬇️
...java/com/instamojo/wrapper/model/PaymentOrder.java 56.81% <ø> (ø) 16 <0> (ø) ⬇️
.../main/java/com/instamojo/wrapper/model/Payout.java 34.04% <ø> (ø) 16 <0> (ø) ⬇️
...va/com/instamojo/wrapper/model/PaymentRequest.java 43.75% <ø> (ø) 25 <0> (ø) ⬇️
...ain/java/com/instamojo/wrapper/util/HttpUtils.java 87.71% <0%> (-0.42%) 17 <2> (ø)
.../java/com/instamojo/wrapper/api/InstamojoImpl.java 52.06% <100%> (ø) 16 <0> (ø) ⬇️
...java/com/instamojo/wrapper/util/DateTimeUtils.java 50% <50%> (ø) 1 <1> (?)
...n/java/com/instamojo/wrapper/util/GsonWrapper.java 66.66% <66.66%> (ø) 1 <1> (?)
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6200a8c...acc0e7f. Read the comment docs.

All datetime fields in the models are now parsed to `org.joda.time.DateTime` in UTC. This is set as a convention to avoid any inconsistencies in the timezone sent in the v2 API. `DateTimeUtils.parseISODateTimeString` will automatically detect the timezone in datetime string and return a `DateTime` object, given that the string is in ISO8601 format.

Signed-off-by: Abeer <abeer.u@instamojo.com>
@im-abeer im-abeer force-pushed the improvement/joda-datetime-wrapper branch from 55a4a83 to acc0e7f Compare January 10, 2019 10:19
@prathik
Copy link

prathik commented Jul 17, 2019

Any reason we prefer joda over java 8 time modules?

@saich
Copy link
Member

saich commented Jul 18, 2019

As of now, this library supports Java 7 also, so we couldn't use the Java 8 time module.

@prathik
Copy link

prathik commented Jul 18, 2019

source compatibility states 1.8, wouldn't that lead to the same target compatibility?

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.

4 participants