FilipDem / Domoticz-NEST-plugin

NEST Plugin for Domoticz using the Google credentials.
13 stars 4 forks source link

Exception on time format #27

Closed ridderr closed 3 years ago

ridderr commented 3 years ago

Hi Filip, I had below exception in the log.

2021-04-29 07:52:32.944 Error: Nest: (Nest) Unforseen exception occured in Nest class: time data '2021-04-29T06:52:32Z' does not match format '%Y-%m-%dT%H:%M:%S.%fZ'

FilipDem commented 3 years ago

I know this problem... Again that occurs very exceptional and in case there are no milliseconds in the date format. I recently made a change (but could not test it in practice as it is very randomly --> I didn't had the problem now a few weeks). Are you running the code from the GitHub (not the file I uploaded for testing, but really the "final" one I committed)? Could you check from line 218 if you really see the code below: if '.' in self._cache_expiration_text: #there are milliseconds in the text format = '%Y-%m-%dT%H:%M:%S.%fZ' else: #milliseconds=0, so there are no milliseconds in the text format = '%Y-%m-%dT%H:%M:%SZ' If you confirm you are running the right code, I will need to dig into it again (and will do, no worry, the problem will be solved). Filip

ridderr commented 3 years ago

Hi Filip, I was still running the testing version. I will update to the committed version and keep you informed.