Skip to content
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

Add simple detection of timestamp resolution for CSV files #7196

Merged
merged 1 commit into from
Dec 3, 2021
Merged

Add simple detection of timestamp resolution for CSV files #7196

merged 1 commit into from
Dec 3, 2021

Conversation

evgfilim1
Copy link
Contributor

@evgfilim1 evgfilim1 commented Dec 3, 2021

Summary

Fixes #6498

Screenshots

N/A

Testing strategy

  • Created a record in Firefox password manager
    Firefox password manager
  • Exported passwords in Firefox, then imported logins.csv file I got in stable (dark themed) and my snapshot (light themed) and compared the results.
    Properties in stable
    Properties in snapshot

Also:

  • Imported my existing *.csv file from Firefox, works fine
  • Run tests included with the code, all passed

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

@droidmonkey
Copy link
Member

droidmonkey commented Dec 3, 2021

UUID import is not a good idea, there is no reason for it from Firefox and it is a backend detail that the user is not allowed to mess with. Plus you aren't doing any duplication checks which can cause a huge mess. I will not merge a UUID import.

Secondly, last accessed is meaningless and doesn't need to be imported. I am likely going to hide that field from view because it literally is equal to modified time in the backend code.

The millisecond precision should be the only change in this code.

#3490 was already implemented, I'm closing that request.

@evgfilim1
Copy link
Contributor Author

evgfilim1 commented Dec 3, 2021

UUID import is not a good idea, there is no reason for it from Firefox and it is a backend detail that the user is not allowed to mess with. Plus you aren't doing any duplication checks which can cause a huge mess. I will not merge a UUID import.

Okay, I'll remove that, thanks for feedback.

Secondly, last accessed is meaningless and doesn't need to be imported. I am likely going to hide that field from view because it literally is equal to modified time in the backend code.

But when a database is imported from CSV, it has different access and modification timestamps, so I decided to add it in case someone needs this information. As far as I understood, it's better to remove this field also because it's useless, right? @droidmonkey

image

@droidmonkey
Copy link
Member

Correct it is useless, probably need to fix the setting of the last accessed field. Just make it equal to modified.

Set access time equal to modification time
@evgfilim1 evgfilim1 changed the title Several improvements to better import data from Firefox CSV Add simple detection of timestamp resolution Dec 3, 2021
@evgfilim1 evgfilim1 changed the title Add simple detection of timestamp resolution Add simple detection of timestamp resolution for CSV files Dec 3, 2021
@evgfilim1
Copy link
Contributor Author

@droidmonkey done, could you review my changes now?

@droidmonkey droidmonkey merged commit b3896f2 into keepassxreboot:develop Dec 3, 2021
@droidmonkey droidmonkey added this to the v2.7.0 milestone Dec 3, 2021
@mmokrejs
Copy link
Contributor

mmokrejs commented Dec 5, 2021

Thanks for your effort, @evgfilim1 !

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

Successfully merging this pull request may close these issues.

CSV Import doesn't handle millisecond times correcrly
3 participants