Open alperozturk96 opened 2 months ago
I think the expected behavior is to have the time in the users timezone that created the setting. If I am in UTC+1 and set it to 12:30, then a user in UTC+2 will see the expiring at 13:30 local time.
I think the expected behavior is to have the time in the users timezone that created the setting. If I am in UTC+1 and set it to 12:30, then a user in UTC+2 will see the expiring at 13:30 local time.
Exactly. We should expire based on the shared user's time zone, not the sharer's or the server's time zone.
I think that would be an enhancement. It could be nice, but we need to discuss this.
The most important part is properly displaying how long before the share expires. We could do this with the new public sharing UI for 31 :thinking:
Just so you know, we already use the owner timezone (26.0.13, 27.1.8, 28.0.4 and 29.0.0) https://github.com/nextcloud/server/pull/43428
I was not able to reproduce. expiration
in oc_share
is populated with the correct expiration date, and take into account the user timezone.
If you can reproduce on latest master, please reopen with reproduction steps.
Keeping opened because my TODO still stands :)
⚠️ This issue respects the following points: ⚠️
Bug description
When user set the share expiration time, it's not expiring based on user's locale.
I shared a file at 26.07.2024 10:21 and set the expiration date to 29.07.2024 10:21. Default time, log time zone is Europe/Berlin. Server time is UTC. Locale is German. Language is English (US). Nextcloud version is v29.0.4.
29.07.2024 10:21 didn't expire.
OC_SHARE table
Details
"expiration" is null in OC_Share table however I set the expiration date.
Maybe these questions can help
Possible Solution
We can hold in DB the timezone difference between UTC and timezone of the shared user and calculate the diff and expire in correct time zone. Therefore, we will not rely on the user's timezone, we will rely on the difference between server time and the timezone of the shared user.
Steps to reproduce
Expected behavior
Share expiration time must be based on user's locale.
Nextcloud Server version
29.0.4