-
Notifications
You must be signed in to change notification settings - Fork 201
Difference in the expiration date response for shares and links #11232
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
Comments
@jesmrec Could you clarify what quest you are executing? Here is an invite request for sharing via UI and I see that TZ is respected.
response:
|
For the Public link, I can confirm, no TZ in a responce. It looks inconsistent. |
09:13:33 vs 23:59:59 this is the issue. In "Share with users", both created and expiration have the same timestamp. |
Sorry I didn't get it in your reply. Why the timestamps are the same? |
@2403905 i will give the complete info with the requests, i hope it helps ;) Link creation:
Response payload:
Creation in response (at the right of the Different, why? ❌ On the other side, sharing with a user:
and the response payload:
Creation date in response (at the right of the They are the same ✅ Summing up:
Let me know if something else could be useful. |
No, it doesn't. If the client sends the expiration time within the TZ the ocis respects the TZ. The response from ocis returns the expirationDateTime in UTC req: "expirationDateTime":"2025-04-16T23:59:59.999+02:00"
response:
|
I see two issues with the public link expirationDateTime
|
but only in links and not in shares. Both should behave the same. |
@saw-jan Do you know why ocis sets the end of day for expirationDateTime only for the public link? |
TBH, I have no idea about this. Maybe it is by design or a bug in oCIS. As far as I understood, @jesmrec's point is |
In my opinion, the API should not restrict the client from setting any future expirationDateTime. All other staff like |
@jesmrec I see different behavior than what you have posted. Link sharePOST https://localhost:9200/graph/v1beta1/drives/{id}/items/{id}/createLink
# Req body
{
"type": "view",
"@libre.graph.quickLink": false,
"password": "8B6>Z<ucW7='",
"expirationDateTime": "2025-04-23T23:59:59.999+05:45", 👈
"displayName": "Unnamed link"
}
# Response
{
"createdDateTime": "2025-04-22T06:59:40.252970115Z", 👈
"expirationDateTime": "2025-04-23T18:14:59Z", 👈
...
} User sharePOST https://localhost:9200/graph/v1beta1/drives/{id}/items/{id}/invite
# Req body
{
"roles": [
"b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5"
],
"expirationDateTime": "2025-04-23T23:59:59.999+05:45", 👈
"recipients": [
{
"objectId": "2a16bc38-f5d9-4c5e-b7f3-676a519f9699",
"@libre.graph.recipient.type": "user"
}
]
}
# Response
{
"value": [
{
"createdDateTime": "2025-04-22T06:57:53.788517402Z", 👈
"expirationDateTime": "2025-04-23T18:14:59.999Z", 👈
...
}
]
} The format for expiry date is different, but the value is the same. |
This is because your TZ. If, for example, you are in Nepal and your server is in central Europe, that The problem only affects "Link share". The "User share" is correct, as explained above. @saw-jan |
So the problem is: |
The problem is: no matter at what time you create a link, it will be returned 23:59:59 at the server time zone. |
Is it problem with the timezone? because I got |
Where are your server and clients located? same location or time setup? |
they are on same location (i.e: my machine) |
You send in your
right? what happens if you send
|
Ahh, now I get it. |
@felix-schwarz Hi Felix. Could you validate the changes? #11239 |
I found some comments related to this:
|
Then, could the problem be in the "share with users", that does not send the "23:59:59" so, the creation one, instead? |
Describe the bug
Creation of public link and share with expiration date, returns timestamps in a different way
Steps to reproduce
Using iOS client, i created a "link" and a "share with user" over the same item, correct
POST
requests with200
Actual behavior
Link creation
POST
request returns:Created at 07:38:10 UTC, but expiration time at 23:59:59 UTC
Share creation
POST
request returns:Created at 07:37:22 UTC, and expiration time at 07:37:00 UTC (ignoring seconds, but this is OK, no problem)
Expected behavior
Both kind of shares with the same way: both 23:59:59, or both in the creation timestamp. I'd go for the second one, more precise.
OTOH, the fact of setting 23:59:59UTC in links is leading to a side-effect in clients. In the Europe Zone, UTC is +2 (summer time). That means, if i set as expiration date, f. ex, 12th May, server returns 12/05 23:59:59UTC, that goes to 13 May, that's not the date the user set within the same time zone.
As a question: would't be better to retrieve dates in the creation TZ? I mean, if i am in UTC+2, dates retrieved in UTC+2 not it UTC, regardless which format they are stored in backend.
Setup
oCIS 7.1.1
(ask me if you need more details)
The text was updated successfully, but these errors were encountered: