-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zk list --created date, returns notes from one day after if YAML date does not have timestamp #382
Comments
Well... Its strange. If I replicate the steps in my testing vault, it works as expected. Will need to investigate (much) further. |
Getting this on
But again, not in the test vault, so this will be something in my config I'm guessing |
Deleted and regenerated my notebook.md. This fixed the error message. But whenever I create a new note, and print out the data on it, it states it was created 17 hours ago (the same as in the original case of my daily note) |
If I copy the file from my own vault, to the testing vault, and run This is despite the 'bug' not being present in the testing vault whereby I can create a note with If I run the same process in my own vault, the note will not be returned under notes created on 2024-01-17. This is super weird... |
So, I've narrowed it down to my custom default template. For some reason this template: ---
title: {{title}}
date: {{format-date now}}
id: {{id}}
tags: [seed]
aliases:
---
# {{title}}
{{content}}
---
References:
Is creating a 'created date' as seen by zk at a fixed time (as the time elapsed is always increasing) , currently notes being created are given the elapsed time of '18 hours ago'. The standard default template does not produce this error. |
It was the A note created with this template, will return the correct creation date. ---
title: {{title}}
id: {{id}}
tags: [seed]
aliases:
---
# {{title}}
{{content}}
---
References: Will look into this further |
That's right, the note creation date is taken from, in order of precedence:
I thought it made sense to use the Maybe there's an issue in the parsing or output of the |
Yes it could be that, or a design flaw in the time library the time elapsed library we use (forgot the name). Date today = 2024-01-18 zk list --created=2024-01-16
2024-01-17 d/2024/2024-01-17.md (yesterday) So So it's working like this:
|
It would appear like the date in YAML isn't being respected at all. I manually created a note now at 22:37, and gave it the date as if it were made 1 minute past midnight today. Then ran
---
date: 2024-01-18 00:01
---
# delete If I create a note via
---
title: delete
date: 2024-01-18 22:35
id: 0mr2
tags: [seed]
aliases: []
---
# delete This is making me think that something is up on the sql or YAML side. As when zk is reading the date from a notes system metadata, instead of YAML, it behaves as expected. |
closed with #384 |
Check if applicable
Describe the bug
I created a daily note today (17th Jan). The system metadata via Finder shows that the file was created today, and the template for naming my daily notes uses
{{format-date now}}
, yet when I runzk list --created=2024-01-17
the note is not returned.It is returned if I run
zk list --created=2024-17-16
Proof of date creation via
ll -l
How to reproduce?
zk configuration
Environment
The text was updated successfully, but these errors were encountered: