Skip to content

Conversation

@City-busz
Copy link
Contributor

The ISO formatted string can be stored in multiple formats. Use the built-in datetime.isoformat() and datetime.fromisoformat() functions, which able to handle all variants.

Fixes: #382

@Evidlo
Copy link
Member

Evidlo commented Mar 11, 2024

Thanks for investigating this.

.fromisoformat on Python 3.6-3.10 does not support the 'Z' suffix to indicate timezone, so we need an additional .replace('Z', '+00:00') as mentioned in this thread

The ISO formatted string can be stored in multiple formats. Use the built-in datetime.isoformat() and datetime.fromisoformat() functions, which able to handle all variants.
Replace 'Z' with '+00:00' to ensure compatibility with Python < 3.11.

Fixes: libkeepass#382
@City-busz
Copy link
Contributor Author

Okay, I updated the MR to include this replace for compatibility.

@Evidlo Evidlo merged commit 18ec462 into libkeepass:master Mar 11, 2024
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

Successfully merging this pull request may close these issues.

[4.0.7] regression -> gnome secrets crashes on expiration date check with missmatch of date format

2 participants