getting default timezone for local time#49087
Conversation
a333f15 to
3d2f2e4
Compare
Signed-off-by: Andrii Ilkiv <a.ilkiv.ye@gmail.com>
3d2f2e4 to
1ab1bbd
Compare
ChristophWurst
left a comment
There was a problem hiding this comment.
Makes sense to use default_timezone here 👍
Thank you very much
A login of that user should fix the problem |
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Summary
In the server/lib/base.php file of the Nextcloud server, UTC is always set as the default timezone:
server/lib/base.php
Line 609 in 4a44d6a
The main argument for this choice seems to be to simplify log reading, as discussed in this issue: #3553.
However, this hardcoding of UTC affects all instances where date_default_timezone_get is used, resulting in UTC even when it would be more intuitive to use the server's timezone or the one set in config.php under default_timezone.
This pull request resolves an issue in the contact menu where the timezone was unexpectedly set to UTC. The fix aligns with other parts of the system that correctly retrieve the default timezone by leveraging similar logic:
https://github.com/search?q=org%3Anextcloud+%22%3EgetDefaultTimeZone%28%22&type=code
TODO
Checklist