-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Template date doesn't respect date settings #1803
Comments
@CalebJohn ping. ;-) any idea what's happening? I can have a look, but since you added this feature, you might have figured it out a lot faster. |
@tessus Thanks for the ping, the issue was that I was setting the templates time format outside a function so it didn't reflect the settings. I've got a pull request to fix it. |
@CalebJohn awesome, thanks. |
Nice thanks for the quick solution. |
@CalebJohn not sure if you PR also fixes, but in 1.0.165 using:
Renders this in a note I just created today (08-16-2019):
So formatting aside, why is it producing the date that Joplin was OPENED, which for me just happened to be two days ago, rather than TODAY'S date as expected? The readme states it would enter current date. Thanks! |
@CollinChaffin You were correct to see that this is indeed the same bug (just a more embarrassing result). What happened was that I was initially building the templates when joplin was first opened. Meaning it wasn't correctly reading settings (because they hadn't loaded yet), but more importantly in your case, it was storing the date that joplin was first opened. The change I made is to rebuild the templates everytime a template is used (don't worry it's not slow) meaning you'll actually get the correct date and time with the proper format. |
Never mind the bugs it's great that we got this feature! |
There isn't currently, I wasn't sure what the best format would be. And figured using the first line (as you do) would be sufficient at first. If you have any ideas on how to include the title, I'm open to it! |
Thanks @CalebJohn I agree with @Nebucatnetzer this for me too has to be the number ONE most exciting new feature and one I'll use daily without question, so I'm glad I wasn't losing my mind and however you fix it is much appreciated! Thanks! |
Maybe Something like this?
|
@CalebJohn any idea when this associated PR that fixes this might be merged and optionally if that will trigger a new build? TIA! |
@CollinChaffin unfortunately this is impossible to say. The only one who merges PRs (besides translation and documentation PRs) is @laurent22. He's also the only one who can create releases (for desktop and mobile). |
In version 1.0.165 we got the new template feature, which is great, however I noticed that when I create a simple template to insert the current date it doesn't respect my date settings.
When I insert the template it writes the date as 15/08/2019 instead of 2019-08-15.
The documentation says that it should respect the date settings.
The template is really just:
The text was updated successfully, but these errors were encountered: