beaussan / update-time-on-edit-obsidian

MIT License
165 stars 15 forks source link

updated date does not change #44

Closed duckste closed 1 year ago

duckste commented 1 year ago

Hey,

Even if I make changes to my files, the updated date in the frontmatter is not updated. With the first edit of a file after enabling this plugin, these two lines were added in the frontmatter. But they do not change when editing the file.

created: 2023-05-10 12:39:11 updated: 2023-05-10 12:39:11

Any tips, how to get an updated time when editing a file?

greetings duckste

tophee commented 1 year ago

@duckste Have you managed to figure this out? I am also trying to understand this plugin...

Anthirian commented 1 year ago

In the developer console (Ctrl + Shift + I) even with the shortest update window possible (1 minute) it continuously refuses to update with this message: Not soon enough, will update latter. This probably happens for you as well. I suspect it's a bug.

tophee commented 1 year ago

For me, the plugin works. So if it is a bug, it must be triggered by some specific conditions. Try disabling all other plugins. And restarting Obsidian. I think my initial glitch went away after I restarted Obsidian.

Anthirian commented 1 year ago

I managed to get it to work again. My issue was with migration of stuff from Joplin, which had a different time and date format. I had set this plugin to match that for reading the fields, but once it had updated once (or with new notes) the read format would not match the write format anymore. This led to the plug-in not recognizing it needed to update the date. I reverted the read format to be identical to the write format and it started working again as intended.

tophee commented 1 year ago

I seem to remember that there is a setting exactly for that, i.e. to use a different date format upon first use...

beaussan commented 1 year ago

Hi, sorry for the delay. This should now be fixed as of 2.0.0. If that's still an issue, feel free to re open a new issue !