owncloud / owncloud/ocis

Difference in expiration date format in the public link and share

Open
#5,452 0 comments 0 reactions 0 assignees View on GitHub
Type:Bug
Dominant language
Go
Stars
2.1k
Forks
274
Avg merge
2d 1h
Merged PRs (30d)
103

Description

while I was creating api test https://github.com/owncloud/ocis/pull/5424 where I check expiration date I came across the difference in expiration date

Steps:
- as admin share resources with expiration date:

Actual:

### share:
- If I set `expireDate=2042-03-25T23:59:59+0100` with timezone -> I get in response same expire date `2042-03-25T23:59:59+0100` locally. but response contains another value in CI `2042-03-25T22:59:59Z` and test fails

- if I set `expireDate=2042-03-25T23:59:59` without timezone or without time -> I get 400 with `could not parse expireDate`

### public link:
- If I set `expireDate=2042-03-25T23:59:59+0100` in the body -> I get `2023-01-27 22:59:59` in response

- if I set `expireDate=2042-03-25` without time and timezone -> I get 200 with `2023-01-28 00:00:00`

My questions:
- what date format do we expect in the request body?
- what date format do we expect in response?
- should data formats be identical for public link and share?

cc @individual-it

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.