nextcloud / calendar

📆 Calendar app for Nextcloud
https://apps.nextcloud.com/apps/calendar
GNU Affero General Public License v3.0
979 stars 240 forks source link

Event imported from ics file has inconsistent start times #5531

Open hannob opened 1 year ago

hannob commented 1 year ago

Steps to reproduce

  1. Import the example file test.ics
  2. Click on the event

Expected behavior

The event should be imported with a correct time.

Actual behaviour

It appears the attached file creates an event with an inconsistent start time. It is shown as 09:45 in the calendar overview, but in the details it shows 07:45.

Calendar app version

4.5.2

CalDAV-clients used

No response

Browser

Firefox 118.0.2

Client operating system

Gentoo Linux

Server operating system

Gentoo Linux

Web server

Apache

Database engine version

SQlite

PHP engine version

PHP 8.2

Nextcloud version

27.1.2

Updated from an older installed version or fresh install

Updated from an older version

List of activated apps

Enabled:
  - activity: 2.19.0
  - admin_audit: 1.17.0
  - calendar: 4.5.2
  - circles: 27.0.1
  - cloud_federation_api: 1.10.0
  - comments: 1.17.0
  - contactsinteraction: 1.8.0
  - dashboard: 7.7.0
  - dav: 1.27.0
  - federatedfilesharing: 1.17.0
  - federation: 1.17.0
  - files: 1.22.0
  - files_pdfviewer: 2.8.0
  - files_reminders: 1.0.0
  - files_rightclick: 1.6.0
  - files_versions: 1.20.0
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - news: 24.0.0
  - nextcloud_announcements: 1.16.0
  - notifications: 2.15.0
  - oauth2: 1.15.1
  - password_policy: 1.17.0
  - photos: 2.3.0
  - privacy: 1.11.0
  - provisioning_api: 1.17.0
  - recommendations: 1.6.0
  - related_resources: 1.2.0
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - sharebymail: 1.17.0
  - support: 1.10.0
  - survey_client: 1.15.0
  - systemtags: 1.17.0
  - text: 3.8.0
  - theming: 2.2.0
  - twofactor_backupcodes: 1.16.0
  - updatenotification: 1.17.0
  - user_status: 1.7.0
  - viewer: 2.1.0
  - workflowengine: 2.9.0
Disabled:
  - bruteforcesettings: 2.7.0 (installed 1.0.3)
  - encryption: 2.15.0 (installed 2.9.0)
  - files_external: 1.19.0
  - files_sharing: 1.19.0 (installed 1.14.0)
  - files_trashbin: 1.17.0 (installed 1.12.0)
  - firstrunwizard: 2.16.0 (installed 2.10.0)
  - suspicious_login: 5.0.0
  - twofactor_totp: 9.0.0
  - user_ldap: 1.17.0
  - weather_status: 1.7.0 (installed 1.1.0)

Nextcloud configuration

{
    "system": {
        "default_locale": "de_DE",
        "force_language": "en",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "sqlite3",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "version": "27.1.2.1",
        "installed": true,
        "theme": "",
        "maintenance": false,
        "defaultapp": "calendar",
        "trusted_domains": [
            "own.hboeck.de"
        ],
        "mail_smtpmode": "smtp",
        "loglevel": 0,
        "secret": "***REMOVED SENSITIVE VALUE***",
        "htaccess.RewriteBase": "\/",
        "appstore.experimental.enabled": true,
        "updater.release.channel": "stable",
        "overwrite.cli.url": "https:\/\/own.hboeck.de",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "lost_password_link": "disabled",
        "default_phone_region": "de",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465"
    }
}

Web server error log

Not relevant

Log file

Not relevant

Browser log

Not relevant

Additional info

Simplified example test.ics file that triggers this bug:


BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//test//test//EN
BEGIN:VEVENT
UID:74f09c9e-0d06-4e77-b7af-6776977f8924
DTSTART:20231012T074500Z
DTSTAMP:20231009T160953Z
SUMMARY:test
END:VEVENT
END:VCALENDAR
hannob commented 1 year ago

ncbugtime Here is a screenshot showing the issue.

hannob commented 1 year ago

Additional relevant info: The time shown in the month overview (09:45 in the example) is the correct one. The 07:45 in the details is wrong.

ChristophWurst commented 1 year ago

The timestamps lack a timezone, so it is assumed that they are in UTC. The month/week/day view converts the timestamp to you local timezone, which must be UTC+2. In the detail view the original timestamp is shown (not the time in your timezone.

See https://github.com/nextcloud/calendar/issues/4802#issuecomment-1750125793.