Mordred / certbot-plugin-websupport

Certbot plugin for DNS using Websupport service.
MIT License
8 stars 4 forks source link

Error determining zone_id: 401 - default timezone issue #5

Closed mentoRisen closed 1 week ago

mentoRisen commented 6 months ago

I was getting error Error determining zone_id: 401 and I was sure that I have credential correct. I tested few api calls on the other project and it worked. I compared your code with websupport examples, and find out that you don't explicitly set timezone in Date header. I think somehow my default timezone was messed up. Anyway, I changed line 208 in dns.py from "Date": datetime.fromtimestamp(timestamp).isoformat() to "Date": datetime.fromtimestamp(timestamp, timezone.utc).isoformat() and added import for timezone and it started working. Probably add this fix to repository.

Mordred commented 6 months ago

Please create a PR :) Thanks