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

fix(dav): Prioritize timezone from core/login #41866

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

ChristophWurst
Copy link
Member

@ChristophWurst ChristophWurst commented Nov 29, 2023

Summary

The DAV app tries to guess a user's timezone from the calendar timezones and the availability settings. It turns out Nextcloud already tracks a timezone, set when a user logs in. Let's use that as primary source, then fall back to calendar timezones and availability timezone.

How to test

  1. Set your calendar timezones to your home timezone
  2. Travel to a different timezone
  3. Log in
  4. Use code that accesses the timezone server

Master: calendar timezone is used
Here: login timezone is used

In the long run we should probably only set, not update the timezone at login, and make the timezone configurable via the personal settings.

Checklist

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst
Copy link
Member Author

/backport to stable28

Copy link
Member

@tcitworld tcitworld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

'core',
'timezone',
);
if ($fromConfig !== '') {
Copy link
Member

@tcitworld tcitworld Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to say that the value might not be a valid timezone ID, but someone fixed that a couple of months ago. #36001 🙈

Older values might still be bad though, as I didn't add a repair step.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good enough IMO. The value is set at every login.

@ChristophWurst ChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Nov 29, 2023
@ChristophWurst ChristophWurst merged commit c29eaf5 into master Nov 29, 2023
50 checks passed
@ChristophWurst ChristophWurst deleted the fix/dav/login-timezone branch November 29, 2023 14:01
@blizzz blizzz mentioned this pull request Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug
Projects
Development

Successfully merging this pull request may close these issues.

3 participants