jplattel / obsidian-query-language

An Obsidian plugin allowing you to query your notes
176 stars 6 forks source link

Interesting Bug? #3

Closed Quorafind closed 3 years ago

Quorafind commented 3 years ago

The plugin works really well! But there is new interesting bug? When I use :

name: 
query: "'blabla"
template: "table"
sort: '-modified'
debug: true
badge: false
fields: ['title', 'modified', 'created']

to query all my files that contain blabla, modified time of some files are earlier than their created time 😂 . like: image You can catch the bug on the first four files in this pic.

jplattel commented 3 years ago

I'm not sure this is a bug in this plugin, it just might by Obsidian itself that's somehow providing the wrong dates..

I'm using the ctime & mtime of the File interface from Obsidian itself: https://github.com/obsidianmd/obsidian-api/blob/master/obsidian.d.ts#L698 only using the Date() to convert it to an ISO timestamp instead of a unix epoch time.

Quorafind commented 3 years ago

Oh, so I need to add a bug report on the Obsidian forum later. Thanks again!

jplattel commented 3 years ago

Yup, I think that's the best thing to do, closing this for now :)