jnbt / candy_check

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

Amend logic for obtaining todays date #21

Closed ricky-crichq closed 4 years ago

ricky-crichq commented 6 years ago

Date.today respects the system time zone when we should be using UTC. This change returns the current day in the UTC time zone.

Candy Check issue: https://github.com/jnbt/candy_check/issues/20

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.1%) to 98.674% when pulling 81c886d9335a28761c43113fd08c355c817ca545 on NuffieProductions:fix-todays-date-always-utc into a61a68935c9aef8c0ac72e47b7b56c2451fb206f on jnbt:master.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.1%) to 98.674% when pulling ce4e4d1e884095f2efd81d4d0d97c70a16f6fe80 on NuffieProductions:fix-todays-date-always-utc into a61a68935c9aef8c0ac72e47b7b56c2451fb206f on jnbt:master.

ricky-crichq commented 6 years ago

Forgot to add... this is pretty easy to reproduce, if you checkout the current master and change your local machines system time to be western states somewhere and then New Zealand time zone. The tests will pass when set to US and then fail when set to NZ.

Checking out this code and running the tests should pass for both time zones.

jnbt commented 4 years ago

@ricky-crichq: I ported your change for the required Google API to #42