Closed nfultz closed 11 months ago
Yes, so far it doesn't care about timezones. I mean, for native calcure events there is no concept of "time" in calcure, only dates, so the "hours" are just text inside the title. However, I see that with .ics files it is a problem.
So, ideally, if in ics event the time is not "all day" we should try reading the timezone if provided, also read local timezone, and correct the time and date accordingly, right?
So, ideally, if in ics event the time is not "all day" we should try reading the timezone if provided, also read local timezone, and correct the time and date accordingly, right?
I think that's a reasonable goal. At the minimum, I would want to adjust the day - UTC midnight is 4pm in my timezone, so evening events are showing up in the wrong box in the calendar.
Can I ask if there are news on this issue? This is literally the only thing preventing me to use calcure, which I find a great tool!
Hi, sorry for the delay. The problem is that it's more complex than I thought. I discovered as few issues actually:
1) ics
library does not read the timezone, so I need to find a workaround to read it.
2) ics
library (incorrectly) assumes that everything is in UTC. I guess that's what @nfultz meant above. This is a bug and should be fixed first.
3) Different calendars write their time zone differently, it seems. So, I'll need to investigate how to convert labels like "Asia/Tokyo" into actual hours value.
Okay, I at least fixed db8897db5c9dab4b51c6a124bc46071ebc57c288 the bug when the time was converted to UTC time and shown as such. This was the bug of ics
library (that exists for many years), which I didn't realize existed. Now, if you stay in one timezone and make events in this timezone everything should work. Please update and test the version 1.9.5
from PyPi:
pipx upgrade calcure
Especially if you live in a negative timezone, like in the USA, please let me know if that works. Next step is to read the provided timezone somehow and correct time accordingly.
Thanks it is indeed much better this way! I can still see problems with timezones, but that solved most of the issues. By the way, I live in Italy.
This issue seems to be resolved, and now all timezones seem to convert to local timezones as expected. Please try to install the current main branch to test:
pipx install git+https://github.com/anufrievroman/calcure
I have tried and I confirm that, so far, the timezones seem to be correctly taken into consideration.
Okay, this seems to fully work now, so I'll close this issue.
I noticed that the calendar doesn't shift according to the locale's time zone, eg no difference when I launch as
Compare vs other cli tools: