Skip to content
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

jrnl does not support the %z strftime directive #444

Open
danielhoherd opened this issue Oct 21, 2016 · 12 comments
Open

jrnl does not support the %z strftime directive #444

danielhoherd opened this issue Oct 21, 2016 · 12 comments
Labels
bug Something isn't working 📌 This can't go stale
Milestone

Comments

@danielhoherd
Copy link

jrnl does not appear to support the %z (timezone offset) strftime directive in its time format.

$ grep time ~/.jrnl_config
  "timeformat": "%F %T%z",
$ jrnl testing
[Entry added to default journal]
$ cat journal.txt
2016-10-21 15:03:47 testing
$ date "+%F %T%z"
2016-10-21 15:04:03-0700
@danielhoherd
Copy link
Author

I just rediscovered this bug when using jrnl, then discovered that I had already filed it! I have verified on macOS and Linux that this is still a problem in jrnl version jrnl==1.9.8 which is the latest available through pip.

@osdouglas
Copy link

+1

@osdouglas
Copy link

Did some reading. Python doesn't support timezones in the stdlib.
https://stackoverflow.com/questions/4530069/python-how-to-get-a-value-of-datetime-today-that-is-timezone-aware

jrnl doesn't do this but with the above article for saving the entries and this article for displaying them, this should be pretty easy:
https://stackoverflow.com/questions/13218506/how-to-get-system-timezone-setting-and-pass-it-to-pytz-timezone

@artgromov
Copy link

for me this works just fine:

from datetime import datetime
TIMEZONE_LOCAL = datetime.now().astimezone().tzinfo
...
timestamp = datetime.now()
if timestamp.tzinfo is None:
    timestamp = timestamp.replace(tzinfo=TIMEZONE_LOCAL)

@wren
Copy link
Member

wren commented Jul 24, 2019

According to @micahellison (in #630), this was a limitation of Python until 3.2. Now that we're moving on from Python 2, we'll be able to add proper %z support soon. We have some date reworking coming down the line, so this will probably be part of that.

@wren wren added the bug Something isn't working label Jul 24, 2019
@osdouglas
Copy link

@wren What's the timeline for the time changes :)

@wren
Copy link
Member

wren commented Sep 5, 2019

@dftchfmstrpnk This issue isn't scheduled in a milestone yet, but PRs are welcome if anyone wants to try to get this into a sooner release.

@stale
Copy link

stale bot commented Nov 4, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Inactive issue: will be closed soon if no activity label Nov 4, 2019
@artgromov
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

SRSLY??

@stale stale bot removed the stale Inactive issue: will be closed soon if no activity label Nov 4, 2019
@wren wren added the 📌 This can't go stale label Nov 6, 2019
@wren
Copy link
Member

wren commented Nov 6, 2019

@artgromov Hi! You seem to care about this feature quite a bit. I understand that it can be frustrating to see something you care about not get the attention you'd like. We try to prioritize the features that users care about, but not everything can make it in all at once (remember that we only have so much time, and this is unpaid work).

So, as I mentioned above, this feature isn't currently scheduled. If you would like to see it in the project sooner than when we have time to work on it, please send us a PR. PRs are the best and fastest way to get a feature you care about into this project. Please be sure to reference this issue number in your PR so the reviewer has more context about the work.

That all being said, I would like to address your comment above. "SRSLY??" is an unprofessional and disrespectful response. I invite you to review our code of conduct. Please use this as a guide for your future comments in this project.

@artgromov
Copy link

Sorry I didn't mean to seem disrespectful at all.

I was frustrated because of "drop the issue when it becomes stale" policy.
This policy severely decreases the project's chances to improve in the future.

@pspeter
Copy link
Contributor

pspeter commented Nov 7, 2019

This policy severely decreases the project's chances to improve in the future.

No, it makes sure only issues people care about stay open, so that maintainers and other contributors don't waste their time implementing stuff that might be not needed anymore.
It helps the project focus on what's important.

@micahellison micahellison added this to the Backlog milestone Sep 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 📌 This can't go stale
Projects
None yet
Development

No branches or pull requests

6 participants