jnbt / candy_check

Check and verify in-app receipts
MIT License
125 stars 70 forks source link

Gem uses server time zone to calculate the current day, not UTC #20

Closed ricky-crichq closed 4 years ago

ricky-crichq commented 6 years ago

When running the tests on my local machine (New Zealand) there was one failure which was caused by time zone issues.

Using Date.today respects the machines local time zone when it should be using UTC.

The failed test:

1) Failure:
CandyCheck::PlayStore::Subscription::unexpired and renewing subscription#test_0002_is two days left until it is overdue [/Users/admin/Code/NuffieProductions/candy_check/spec/play_store/subscription_spec.rb:82]:
  Expected: -2
  Actual: -1
jnbt commented 4 years ago

Fix included in version 0.2.1