keepassxreboot / keepassxc

KeePassXC is a cross-platform community-driven port of the Windows application “Keepass Password Safe”.
https://keepassxc.org/
Other
20.99k stars 1.45k forks source link

CSV Import: Show error when datetime fields are not in proper format #9584

Open dimar112q opened 1 year ago

dimar112q commented 1 year ago

Overview

When importing CSV, the "Last Modified" and "Created" dates are showing correctly in in the preview, before pressing OK. Everything else is also showing correctly in the preview window. Once imported, the "Last Modified" and "Created" are showing the current date and time, instead of what was shown in the preview.

Steps to Reproduce

  1. Import test.csv
  2. enable first line has field names
  3. set header lines skipped to 2
  4. group not present
  5. title to title
  6. username to username
  7. password to password
  8. URL to URL
  9. Notes to Description
  10. TOTP not present
  11. Icon not present
  12. Last Modified to Modified
  13. Create to Created
  14. Note the Last Modified and Created dates (created should be showing 2005 and 2016)
  15. OK
  16. The imported results are showing the present date and time

Expected Behavior

Actual Behavior

Once imported, the "Last Modified" and "Created" are showing the current date and time, instead of what was shown in the preview.

Context

KeePassXC - VERSION Revision: REVISION KeePassXC - Version 2.7.5 Revision: 9d0537b

Qt 5.15.9 Debugging mode is disabled.

Operating system: Windows 11 Version 2009 CPU architecture: x86_64 Kernel: winnt 10.0.22621

Enabled extensions: test.csv

Cryptographic libraries:

Operating System: Windows 11 Pro Windowing System: 22H2

dimar112q commented 1 year ago

This version has the same issue.

KeePassXC - Version 2.8.0-snapshot Build Type: Snapshot Revision: a5c1298

Qt 5.15.6 Debugging mode is disabled.

Operating system: Windows 10 Version 2009 CPU architecture: x86_64 Kernel: winnt 10.0.22621

Enabled extensions:

Cryptographic libraries:

droidmonkey commented 1 year ago

What is the date format, please post a sample

dimar112q commented 1 year ago

I attached test.csv in the original post.

droidmonkey commented 1 year ago

You need to format your date time into ISO 8601 date time format.

Example: 2014-02-24T10:20:49+02:00

dimar112q commented 1 year ago

In Excel I used custom format type yyyy-mm-ddThh:MM:ss and now the date and time import correctly. My previous password manager exported the CSV using the following format: m/d/yyyy h:mm which KeePass XC wouldn't accept.