Skip to content

Script fails other Date Formats #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
soberhofer opened this issue Jun 19, 2024 · 2 comments
Closed

Script fails other Date Formats #2

soberhofer opened this issue Jun 19, 2024 · 2 comments

Comments

@soberhofer
Copy link

I am getting the following error on the client, when it is trying to run the script:

ValueError: time data 'Di 18 Jun 2024 14:48:20 CEST' does not match format '%a %b %d %H:%M:%S %Z %Y'

This is happening on a client with german locale and the error is raised in the following line:

out['last_compliance_check'] = str(int(time.mktime(datetime.datetime.strptime(pl[item], "%a %b %d %H:%M:%S %Z %Y").timetuple())))

@soberhofer
Copy link
Author

I was able to avoid the error by using pl[item] without the whole date manipulation. I guess the format is wrong then, but it just writes the string as is into the table

@tuxudo
Copy link
Owner

tuxudo commented Sep 9, 2024

This should be resolved in v1.2 of the module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants