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

"today" calculated relative to UTC rather than system time #56

Closed
MatiasWettstein opened this issue Jul 11, 2024 · 11 comments · Fixed by #67
Closed

"today" calculated relative to UTC rather than system time #56

MatiasWettstein opened this issue Jul 11, 2024 · 11 comments · Fixed by #67
Labels
bug Something isn't working

Comments

@MatiasWettstein
Copy link

Can we define the default time zone for the calendar?

For example, in the calendar, I have the "today" part, but in my case, I need to set the default TZ at UTC-3, because it detects the next day at 9:00 PM of the current day.

Is this something that is planned to be implemented into cally?

Thanks!

@WickyNilliams
Copy link
Owner

Just to be sure what you are saying: you are seeing the css part today being applied to the wrong date?

If so, I think this is a bug and should be fixed, rather than exposing some timezone property

@MatiasWettstein
Copy link
Author

Yes, for example in my case I'm in the UTC-3 zone and when I use the calendar after 9 PM the CSS part today indicates the next day, I assume it is because it detects the 00:00 of the next day.

@WickyNilliams
Copy link
Owner

Got it! Sounds like a bug then. I think it's calculating today based on UTC time. I can change this to make the calculation relative to system time instead.

@WickyNilliams WickyNilliams added the bug Something isn't working label Jul 11, 2024
@WickyNilliams WickyNilliams changed the title Ability to set the default time zone "today" calculated relative to UTC rather than system time Jul 11, 2024
@gavrichards
Copy link

We would love to see this change. We have users all over the world, so showing today's date in UTC will confuse many of them. What would be ideal is if it defaulted to the user's time zone, but there was a way of passing in a time zone as an attribute to use instead, should we wish to force the calendar to act as though it's in a defined time zone.

@gavrichards
Copy link

May I ask if there's any likelihood of this being addressed within the next few months?
Alternatively, would the maintainer accept a PR to resolve this?
It would be good to know if it's worth us investing our time in a PR, or forking, or waiting it out.
Thanks!

@WickyNilliams
Copy link
Owner

WickyNilliams commented Nov 1, 2024

Apologies, I started a new job and my personal laptop died on me. Between the two I haven't had a great deal of time to work on Cally.

A PR is most definitely welcome! If you could limit it to just fixing the immediate bug for now. We can worry about configuration later.

@WickyNilliams
Copy link
Owner

@gavrichards I had some spare time, and the fix turned out to be simple (at least in my testing). Will release momentarily

@gavrichards
Copy link

Oh fantastic, thank you so much!

@WickyNilliams
Copy link
Owner

Try v0.7.2!

@gavrichards
Copy link

I can confirm it's working nicely, thank you again.

@WickyNilliams
Copy link
Owner

Glad to hear! Excuse the delay :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants