Menu

#2444 Duplicated entry inherits an incorrect creation time

KeePass_2.x
closed
None
5
3 days ago
4 days ago
No

When duplicating an entry using Entry → Duplicate Entry, the newly created entry gets an incorrect Creation Time.

The creation time of the duplicated entry is set to the date/time of the last modification of the original entry, instead of the date/time when the duplication was performed.

Steps to reproduce:
Create an entry.
Modify the entry at a later time and save the database.
Wait some time so that the modification time and the duplication time are clearly different.
Select the entry.
Use Entry → Duplicate Entry.
Check the creation time of the duplicated entry.

Actual behavior:
The duplicated entry's Creation Time is set to the date/time of the last modification made to the original entry.

This can be confirmed in both:

  • The duplicated entry's modification/history information.
  • The KeePass history/log where the relevant timestamps are displayed.

Expected behavior:
The duplicated entry is a newly created entry, so its Creation Time should be set to the current date and time at the moment when Entry → Duplicate Entry is executed.

In other words:
Creation Time = date/time when the entry was duplicated

and not:
Creation Time = last modification date/time of the original entry

Discussion

  • Santiago González

    This is particularly problematic when reviewing the global history.

    Recently duplicated entries may not appear among the newest entries because they inherit an old creation timestamp from the original entry. If the original entry was created or last modified months or even years ago, the duplicated entry can appear far back in the history even though it was actually created recently.

    As a result, the global history becomes unreliable for identifying entries that were created recently.

     
  • Paul

    Paul - 4 days ago

    I can't replicate your date values.
    In my testing the last modified time is inherited and the creation time is set to the time of duplication. This seems to be correct for a copy.
    When you modify the copy the modification date is set correctly.

    Using "Find last modified" does not check creation dates so it misses recently copied entries.
    Strickly speaking this is correct because nothing has changed in the duplicated entry - the Title may have but that is not really relevant to KeePass use.
    Maybe adding an additional find option would be a better solution.

    cheers, Paul

     
    • Santiago González

      English is not my first language, so I may not have explained the issue clearly before. I have now attached screenshots to illustrate it better.

      "Google (t...)" is the original entry, which was last modified on 2026-05-26.

      "Google (a...)" is the duplicated entry. In KeePass history, it appears as if it was modified on 2026-05-26, but that timestamp is incorrect, since I duplicated the entry only a few days ago.

      If you look at the duplicated entry's own history, you can see that I actually created it on 2026-09-10. A few seconds later, I modified it, because I edited the duplicated entry immediately after creating it.

      However, the history incorrectly makes it look as if the duplicated entry had already existed since 2026-05-26, which is actually the date of the last modification of the original entry, and was then modified again almost four months later.

      That is the problem: the duplicated entry is inheriting a timestamp from the original entry instead of using the actual date and time when the duplicate was created.

       
      • wellread1

        wellread1 - 3 days ago

        You are looking at the wrong time-stamp. The Creation Time, not the Last Modification Time, reflects the date-time the entry was created. The duplicated entry is intended to reflect the original entry until it is edited by the user. For this purpose, duplication doesn't count as a modification, so the new entry inherits the last modification time of the original entry.

         

        Last edit: wellread1 3 days ago
  • Dominik Reichl

    Dominik Reichl - 3 days ago
    • status: open --> closed
     
  • Dominik Reichl

    Dominik Reichl - 3 days ago

    When duplicating an entry, the intended/expected behavior is that the copy's creation time is set to the current time and its last modification time is the same as the one of the original. Most applications are behaving like this, and it's also consistent with other ways for creating/copying entries; see e.g.
    https://sourceforge.net/p/keepass/discussion/329220/thread/05f5050754/

    This is exactly what KeePass does already (I've just tested it again), i.e. I cannot reproduce the behavior that you mentioned in your ticket post.

    The creation time of an entry can for example be found in the details view of the main window (item 'Creation Time') and in the entry dialog (tab 'History' → line 'Created'). The lists/features that you mentioned are showing/using last modification times instead. Especially, the hint in the 'History' dialog says: "List of entries that have been modified recently", and duplicating an entry isn't modifying data (the last modification time stays the same).

    I could imagine enhancing the 'History' dialog such that it additionally shows entry creations, but that would result in various problems (for example, when creating a new entry, the creation time and the last modification time differ by the time that the user spent in the entry dialog, and thus the user would see two rows in the 'History' dialog for entry creations); I'm not sure whether this is a good idea... Maybe as an option. In any case, I'm not seeing a bug here.

    Best regards,
    Dominik

     

Log in to post a comment.