Sharing Expiration -- Can't remove?

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?


If you want to revoke the expiration, you should first uncheck the default expiration date

  • image

in the admin settings tab of shares in https://cloud.domain.tld/settings/admin/sharing

At least that’s how it works for me. I hope it works that way for you too.

Much luck,

Hmm. Interesting.

I think I tried that without success.

However, at the moment I can’t get it to fail at all, either way.

Daylight savings time expired over the weekend though (we’re back to standard time), so I wonder if that had anything to do with it.

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.

Much luck,

Hello, I have the same problem in one installation, I think this is a bug in latest update.
There is on occ command to disable it ?


Hello, no idea about that ?

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.

1 Like

@bb77 sorry :slight_smile:

I have a default expiration date in share and I could not remove it.

In this thread someone seems to have this problem too, unfortunately I couldn’t reproduce that either, so I’m not sure what’s causing it.

We have the same issue since Update to 27.1.3 and i have described it in this already mentioned other thread: Expiration time setting for internal links - #13 by Muckinger