Strange date save behavior

burrum 10 aastat tagasi uuendaja Alex Jenter 10 aastat tagasi 2
Saving creation and modification dates in 1.5.5p2 works in unintuitive way. It can be decomposed to three issues.

When creating a new note, creation time is displayed instantly (effect 1), even before you save anything, and if you wait a minute and save, note gets wrong creation time (effect 2).

Use case:
1. Open an editor for a new note (Ins)
2. The creation time is displayed instantly. Let it be 15:08. Also check the system time is 15:08
3. Wait a minute, system time becomes 15:09
4. Save the note. It gets creation time 15:08

Now consider another use case showing effect 3:
1. Open an editor for a new note (Ins).
2. Type a word, save. Note is saved with creation date (that timestamp from the moment of opening new note window).
3. Not closing that editor, all subsequent edits and saves to this note don't change any date UNLESS you wait the next minute - if you save then, modified date label appears (or changes).

It also looks like timestamp is truncated to a minute precision (could be wrong here, not sure how it is stored internally).

I think all issues could be fixed by changing behavior to this:
1. Open an editor for a new note (Ins)
2. No dates are displayed (and written) until you..
3. Press Ctrl+S or OK to close the note
4. Current timestamp (full, with milliseconds) is saved to creation date
5. Creation date is displayed in note editor and note preview header
6. If you pressed Ctrl+S in 3 (not closed the editor), second save adds modified date with time of save moment, and further saves change that date

Alternative version - as in a file system - both creation and modification dates are set to current timestamp on first save, and subsequent saves change only modification date.
editing date-time


Fixed in 1.5.6
I confirm that the behavior is not very intuitive. Will try to include the fix into 1.5.6
1.5.6 prerelease 3 - confirm, it's cool now =)
Fixed in 1.5.6