### ⚠️ This issue respects the following points: ⚠️
- [X] This is a **bug**, no…t a question or a configuration/webserver/proxy issue.
- [X] This issue is **not** already reported on [Github](https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3Abug) OR [Nextcloud Community Forum](https://help.nextcloud.com/) _(I've searched it)_.
- [X] Nextcloud Server **is** up to date. See [Maintenance and Release Schedule](https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule) for supported versions.
- [X] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).
### Bug description
When trying to create a share with an expiration date, it fails. Nextcloud claims the date would be in the past, but it actually is in the future.
### Steps to reproduce
1. Create a share
2. Try picking an expiration date for the share
3. Saving won't work, because Nextcloud says the date is in the past, even though picked date isn't
![Bildschirmfoto vom 2024-01-31 18-19-40](https://github.com/nextcloud/server/assets/40753639/09cb2ee2-032c-43ad-bd2c-913998aa66de)
### Expected behavior
Expiration date should be saved
### Installation method
None
### Nextcloud Server version
28
### Operating system
None
### PHP engine version
PHP 8.2
### Web server
Apache (supported)
### Database engine version
MariaDB
### Is this bug present after an update or on a fresh install?
Updated from a MINOR version (ex. 22.1 to 22.2)
### Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
### What user-backends are you using?
- [X] Default user-backend _(database)_
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
### Configuration report
```shell
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"***REMOVED SENSITIVE VALUE***"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "28.0.2.4",
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"overwriteprotocol": "https",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"skeletondirectory": "",
"default_language": "de",
"default_locale": "de_DE",
"default_phone_region": "DE",
"minimum.supported.desktop.version": "3.5.3",
"activity_expire_days": 90,
"filelocking.enabled": "true",
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"htaccess.RewriteBase": "\/",
"updater.release.channel": "stable",
"maintenance": false,
"theme": "",
"loglevel": 3,
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauth": 1,
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"mail_smtpsecure": "tls",
"mail_smtpauthtype": "LOGIN",
"app_install_overwrite": [
"drawio",
"deck"
]
}
}
```
### List of activated Apps
```shell
Enabled:
- activity: 2.20.0
- admin_audit: 1.18.0
- bruteforcesettings: 2.8.0
- calendar: 4.6.4
- circles: 28.0.0-dev
- cloud_federation_api: 1.11.0
- comments: 1.18.0
- contacts: 5.5.1
- contactsinteraction: 1.9.0
- dashboard: 7.8.0
- dav: 1.29.1
- deck: 1.12.1
- drawio: 3.0.2
- federatedfilesharing: 1.18.0
- files: 2.0.0
- files_antivirus: 5.4.1
- files_lock: 28.0.1
- files_mindmap: 0.0.30
- files_pdfviewer: 2.9.0
- files_reminders: 1.1.0
- files_sharing: 1.20.0
- files_trashbin: 1.18.0
- files_versions: 1.21.0
- forms: 4.0.0
- groupfolders: 16.0.3
- holiday_calendars: 0.3.0
- logreader: 2.13.0
- lookup_server_connector: 1.16.0
- mail: 3.5.5
- notes: 4.9.2
- notifications: 2.16.0
- oauth2: 1.16.3
- password_policy: 1.18.0
- photos: 2.4.0
- polls: 6.0.1
- provisioning_api: 1.18.0
- quota_warning: 1.18.0
- recommendations: 2.0.0
- related_resources: 1.3.0
- richdocuments: 8.3.1
- serverinfo: 1.18.0
- settings: 1.10.1
- sharebymail: 1.18.0
- spreed: 18.0.3
- systemtags: 1.18.0
- tasks: 0.15.0
- terms_of_service: 2.3.2
- text: 3.9.1
- theming: 2.3.0
- twofactor_backupcodes: 1.17.0
- updatenotification: 1.18.0
- user_status: 1.8.1
- viewer: 2.2.0
- weather_status: 1.8.0
- workflowengine: 2.10.0
Disabled:
- encryption: 2.16.0
- externalpassword: 1.1.0 (installed 1.1.0)
- federation: 1.18.0 (installed 1.14.0)
- files_external: 1.20.0
- firstrunwizard: 2.17.0 (installed 2.8.0)
- nextcloud_announcements: 1.17.0 (installed 1.13.0)
- privacy: 1.12.0 (installed 1.8.0)
- ransomware_protection: 1.14.0 (installed 1.14.0)
- support: 1.11.0 (installed 1.7.0)
- survey_client: 1.16.0 (installed 1.12.0)
- suspicious_login: 6.0.0 (installed 4.3.0)
- twofactor_totp: 10.0.0-beta.2
- user_ldap: 1.19.0
```
### Nextcloud Signing status
```shell
No errors have been found.
```
### Nextcloud Logs
```shell
Exception OCA\Files_Sharing\Controller\ShareAPIController::parseDate(): Argument #1 ($expireDate) must be of type string, DateTime given, called in /***REMOVED SENSITIVE VALUE***/apps/files_sharing/lib/Controller/ShareAPIController.php on line 837 in file '/***REMOVED SENSITIVE VALUE***/apps/files_sharing/lib/Controller/ShareAPIController.php' line 1695
Exception thrown: Exception
```
### Additional info
_No response_