I’m using the latest Nextcloud release (27.1.3) and latest PHP (8.2.12) and I have a default expiration date for shares. At least on a public share, it appears that the expiration date checkbox can’t be unchecked. It will show mm/dd/yyyy for the expiration date, then when re-entering it may show 12/31/1969 (is that a -1 or something?).
Seems pretty basic, but I didn’t find anyone mentioning it on the forums after a quick search.
Is this a problem with my installation in particular (although I have multiple installations that act this way) or do other people see this as well? Is there a work-around?
I just tried again, and the problem behavior is back.
The behavior even exists if I disable the default expiration. The dialog lists the expiration as 12/31/1969, then goes to dd/mm/yyyy if I try to change the checkbox … but the checkbox stays checked.
At least that can be explained. This has to do with the time of day. Unix time starts on January 1st, 1970 UTC and if your local time is before that depending on the time of day, then negative Unix time results and it jumps to December 31st, 1969
I didn’t write the code, I’m just reading it, but I can remember that there were often problems revoking expiration dates when an expiration date was forced to set beforehand. But I’ve never traced it exactly yet because I don’t use it.
Maybe someone who knows the exact mechanism can get involved here.
What do you mean by “having the same problem”? Negative UNIX time, unable to uncheck the box, or both?
Sorry but adding a low effort “I’m having the same problem” comment to an existing thread, without providing any additional information, usually isnt’t helpful. In almost any case it’s better to open a new thread, and filling out the support template.
EDIT: By the way, I can’t reproduce this on my instance. So it’s probably not a general issue or bug in Nextcloud.