Today's date ignores local_timezone
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.1k
- Forks
- 233
- Avg merge
- 1h 44m
- Merged PRs (30d)
- 1
Description
My config has the following:
[locale]
default_timezone = America/Los_Angeles
local_timezone = America/Los_Angeles
My computer's timezone is set to UTC. It's displaying 2019-01-22 06:30:00 right now.
In Los Angeles, the time is currently 2019-01-21 22:30:00.
When I run khal, this is what I get:
$ khal
Su Mo Tu We Th Fr Sa Today, 2019-01-22
Jan 30 31 1 2 3 4 5 17:00-20:00 Meeting
6 7 8 9 10 11 12 Tomorrow, 2019-01-23
13 14 15 16 17 18 19 Thursday, 2019-01-24
20 21 22 23 24 25 26 17:00-20:00 Meeting
Feb 27 28 29 30 31 1 2 Friday, 2019-01-25
3 4 5 6 7 8 9 16:30-18:30 Meeting
10 11 12 13 14 15 16 Saturday, 2019-01-26
17 18 19 20 21 22 23
Mar 24 25 26 27 28 1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Apr 31 1 2 3 4 5 6
I expect Today, 2019-01-22 to be the 21st of January, not the 22nd of January.
The event times show up correctly, but they are truncated if their day is not shown.
$ khal calendar 2019-01-21
Su Mo Tu We Th Fr Sa Monday, 2019-01-21
Jan 30 31 1 2 3 4 5 23:00-24:00 Today!
6 7 8 9 10 11 12 Today, 2019-01-22
13 14 15 16 17 18 19 17:00-20:00 Meeting
20 21 22 23 24 25 26 Tomorrow, 2019-01-23
Feb 27 28 29 30 31 1 2 Thursday, 2019-01-24
3 4 5 6 7 8 9 17:00-20:00 Meeting
10 11 12 13 14 15 16 Friday, 2019-01-25
17 18 19 20 21 22 23 16:30-18:30 Meeting
Mar 24 25 26 27 28 1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Apr 31 1 2 3 4 5 6
This happens for me both via pip install khal and from running master.
Is this something fixable from my configuration or is it worth me making a pull request for?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the shown [locale] configuration and the khal command, using a UTC system timezone and America/Los_Angeles as local_timezone. Trace how khal determines the displayed Today date and event-day labels; done means Today reflects the configured local date and events are not incorrectly truncated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100