franciskafieh / obsidian-list-modified

🪨 The advanced and adaptive changelog for Obsidian. Links all modified files meeting certain criteria to a timed (daily, weekly, monthly) note.
110 stars 7 forks source link

[BUG] A modified note will appear in "LIST CREATED" log, with a wrong timecode. #120

Open Elaws opened 1 week ago

Elaws commented 1 week ago

Describe the bug

Desktop (Windows 11) and mobile (Android) are synced through SyncTrayzor/Syncthing. I modified a note for the first time of the day on Obsidian desktop (Obsidian mobile is closed and was not opened in the last 2 hours).

Expected behaviour

The modification should be logged in "LIST MODIFIED".

Actual behavior

For some reason, that modification created a log in "LIST CREATED", with a wrong timecode (note was modified around 00:30AM, and timecode is 11:33AM).

Please find below a screenshot of daily notes from 11th of November (yesterday), and from 12th of November (today, when the note was modified).

11th November daily note :

image

12th November daily note :

image

My setup

Steps to reproduce bug

To be investigated.

franciskafieh commented 1 week ago

The modification time is taken directly from Obsidian's file info mtime property, which is known to mess up with sync. A possible alternative would be to use a plugin that adds your current time to a property when you modify the file, and then use custom List Modified placeholders in your output format (e.g. [[f.modifytime]]). I think this plugin may do this, but I am not completely sure after reading the readme. There is a plugin out there that does not count on Obsidian's file times, but I can't remember the name atm.

The modification should be logged in "LIST MODIFIED".

I will look into this.

Elaws commented 6 days ago

If it may help, I noticed that the first note I modify for the first time of the day and which creates a log in "LIST CREATED", comes with the following warning :

image

Whatever note I modify for the rest of the day won't create an entry in "LIST CREATED". It seems to be only the first modification of the first note of the day.

franciskafieh commented 5 days ago

This is the same issue as #114 . Have you updated the plugin yet? The release from 4 days ago fixes that issue. Let me know how that goes

Elaws commented 5 days ago

Thank you ! Will update / close if needed.

technotherion commented 4 days ago

The modification time is taken directly from Obsidian's file info mtime property, which is known to mess up with sync. A possible alternative would be to use a plugin that adds your current time to a property when you modify the file, and then use custom List Modified placeholders in your output format (e.g. [[f.modifytime]]). I think this plugin may do this, but I am not completely sure after reading the readme. There is a plugin out there that does not count on Obsidian's file times, but I can't remember the name atm.

The modification should be logged in "LIST MODIFIED".

I will look into this.

In case anyone else is looking for a plugin that has this functionality, I use Linter which has auto-updating YAML tag functions to set my created_date and modified_date properties. Linter is one of the plugins that I recommend most strongly of any plugin I've used.

Speaking of which, I am using these frontmatter properties ([[f.created_date]] and [[f.modified_date]]) in order to show the correct date and time since I am using a sync solution. However, this does not exclude notes that have an incorrect mtime, so I get weekly note entries that look like the following: (this is a small sample)

- [[2024-11-15]] - 2024-11-15 01:39:38
- [[Ghost Ref]] - 2024-11-15 01:59:33
- [[4. Archives/2. Areas/Career/Portfolio]] - 2023-08-23 10:00:00
- [[Imp Ori]] - 2024-09-05 01:42:47
- [[Representing times of day]] - 2024-02-29 12:00:00
- [[Car Tool Box]] - 2024-09-01 02:29:35
- [[Car Cleaning Kit]] - 2024-07-06 12:21:49
- [[Battery Replacement]] - 2024-09-12 01:34:36
- [[Jeep Not starting - Battery]] - 2024-07-24 09:14:26
- [[Toys]] - 2024-09-07 12:50:00
- [[Clawssss]] - 2024-09-29 12:37:12
- [[Booster Seat idea]] - 2024-08-22 01:05:15
- [[wish list]] - 2024-07-21 12:09:25
- [[Why You Should Flatten Your Document Libraries]] - 2024-11-16 06:04:10
- [[Linking to Headings and Blockquotes]] - 2024-11-16 07:10:45
- [[! Capture/2024-11-16]] - 2024-11-16 10:27:55

The common link between the files from other weeks/months that show on my Created list is that they are files that I've moved to my "4. Archive" directory. I have a plugin that automatically changes the path of the files when I archive them. Maybe this is tricking the plugin into thinking I've created new files instead of moving them?

Please let me know if this should be a new issue. Thanks!

franciskafieh commented 2 days ago

Thank you ! Will update / close if needed.

Any updates?

I have a plugin that automatically changes the path of the files when I archive them. Maybe this is tricking the plugin into thinking I've created new files instead of moving them?

If a file is renamed (incl. changed path), List Modified will add it to the created list if it is not already tracked. The only workaround for this would be to add your 4. Archive directory to the excluded directions in List Modified settings.

Elaws commented 2 days ago

I'm afraid I was able to reproduce the problem right now. I modified a note (that was created last sunday) past midnight for the first time of the day (20th of November), and that note has been added to the "LIST CREATED" log of today.

So that note appears in 2 daily notes : the daily note of 17th of November, where the note was created, and the daily note of 20th of November, with a wrong timecode (it says 5:32PM instead of shortly after midnight).