Closed therefromhere closed 5 years ago
I think it would be nice to handle this change in a sensible manor. Cleanest i guess would be looking into the cache version.
OK, I'll take a look at the cache version.
@therefromhere As a matter of best practice, timestamps should always be stored as UTC. Admittedly, it's unlikely that you'll move between geographic timezones frequently, but it's still worth doing if only to avoid twice-annual confusion when clocks change with daylight savings.
Yeah, currently the cache timestamp is using naive machine time, my change will make it use a aware UTC .
I've updated that now so cache is reset except for the auth token when the version changes.
So ./sp_cli.py --update
should work through a version change.
For consistency with the SurePet api data, and so that the cachefile doesn't depend on machine timezone.
Note that this is a breaking change (will cause a TypeError vs existing caches due to naive vs aware comparison). Is that a problem? - if so I could either handle the TypeError, or bump the cache version and make
update_required
check the version?