nextcloud / nextcloud/server

[Bug]: Birthdays are not properly localized for contacts in dashboard

Open
#58,145 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 32-feedback bug
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

Birthdays are not being properly localized for contacts.

Here is an example vcard contact to reproduce the issue:

BEGIN:VCARD
VERSION:4.0
PRODID:+//IDN bitfire.at//DAVx5/3.3.12-ose ez-vcard/0.11.2
GENDER:M
UID:a109c6e8-d6ec-425e-8cf5-7ad195ed926e
FN:Firstname Lastname
N:Lastname;Firstname;;;
GROUP1.EMAIL:example@example.com
GROUP1.X-ABLABEL:Personal
BDAY;VALUE=DATE:20030207
TZ:America/Toronto
LANG:en
LANG:fr
REV;VALUE=DATE-AND-OR-TIME:20241126T025608Z
END:VCARD

This vcard has a timezone of America/Toronto and a birthday of 2003-02-07. I am also in the America/Toronto timezone, and currently on the dashboard under "upcoming events" the birthday as happening in "2 hours" even though it is currently 5 p.m.

However within the calendar app, it correctly shows the birthday as occurring tomorrow.

Further, if a contact does not have a timezone, it should localize it to the current user's timezone.

Steps to reproduce
  1. Configure local device & user to be in timezone other than UTC
  2. Add contact with birthday set to tomorrow & same timezone as user
  3. Under "upcoming events" on the dashboard it shows the incorrect number of hours until the contact's birthday
Expected behavior

Shows the correct number of hours until the contact's birthday based on the contact's or the user's timezone.

Nextcloud Server version

32

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.5

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nextcloud.solonovamax.gay",
            "nextcloud.solonovamax.ca",
            "86.48.27.44"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "version": "32.0.3.2",
        "dbtype": "mysql",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "installed": true,
        "default_language": "en",
        "force_language": false,
        "default_locale": "en_US",
        "default_phone_region": "CA",
        "force_locale": false,
        "defaultapp": "dashboard,files",
        "knowledgebaseenabled": true,
        "allow_user_to_change_display_name": true,
        "remember_login_cookie_lifetime": 1296000,
        "session_lifetime": 86400,
        "session_relaxed_expiry": true,
        "session_keepalive": true,
        "auto_logout": false,
        "token_auth_enforced": false,
        "token_auth_activity_update": 300,
        "auth.bruteforce.protection.enabled": true,
        "auth.webauthn.enabled": true,
        "twofactor_enforced": false,
        "twofactor_enforced_groups": [
            "admin"
        ],
        "twofactor_enforced_excluded_groups": [],
        "auth.storeCryptedPassword": true,
        "hide_login_form": false,
        "skeletondirectory": "\/var\/www\/nextcloud\/data\/skeleton",
        "overwriteprotocol": "https",
        "overwritehost": "nextcloud.solonovamax.gay",
        "overwritewebroot": "\/",
        "overwrite.cli.url": "https:\/\/nextcloud.solonovamax.gay\/",
        "htaccess.RewriteBase": "\/",
        "htaccess.IgnoreFrontController": false,
        "trashbin_retention_obligation": "auto",
        "versions_retention_obligation": "auto",
        "appcodechecker": true,
        "updatechecker": true,
        "updater.server.url": "***REMOVED SENSITIVE VALUE***",
        "updater.release.channel": "stable",
        "has_internet_connection": true,
        "connectivity_check_domains": [
            "www.nextcloud.com",
            "www.startpage.com",
            "www.eff.org",
            "www.edri.org"
        ],
        "check_for_working_wellknown_setup": true,
        "check_for_working_htaccess": true,
        "check_data_directory_permissions": true,
        "config_is_read_only": false,
        "log_type": "file",
        "log_type_audit": "file",
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "logfile_audit": "\/var\/log\/nextcloud\/audit.log",
        "logfilemode": 416,
        "loglevel": 2,
        "loglevel_frontend": 2,
        "syslog_tag": "Nextcloud",
        "syslog_tag_audit": "Nextcloud",
        "logdateformat": "F d, Y H:i:s",
        "logtimezone": "America\/Toronto",
        "log_query": false,
        "log_rotate_size": 104857600,
        "profiler": false,
        "customclient_desktop": "https:\/\/nextcloud.com\/install\/#install-clients",
        "customclient_android": "https:\/\/play.google.com\/store\/apps\/details?id=com.nextcloud.client",
        "customclient_ios": "https:\/\/itunes.apple.com\/us\/app\/nextcloud\/id1125420102?mt=8",
        "customclient_ios_appid": "1125420102",
        "appstoreenabled": true,
        "appstoreurl": "https:\/\/apps.nextcloud.com\/api\/v1",
        "apps_paths": [
            {
                "path": "\/var\/www\/nextcloud\/apps",
                "url": "\/apps",
                "writable": true
            }
        ],
        "enable_previews": true,
        "preview_format": "webp",
        "preview_concurrency_all": 8,
        "preview_concurrency_new": 4,
        "preview_max_x": 4096,
        "preview_max_y": 4096,
        "preview_max_filesize_image": 128,
        "preview_max_memory": 1024,
        "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
        "preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
        "preview_ffmpeg_path": "\/usr\/bin\/ffmpeg",
        "enabledPreviewProviders": [
            "OC\\Preview\\Imaginary",
            "OC\\Preview\\ImaginaryPDF",
            "OC\\Preview\\Movie",
            "OC\\Preview\\MP4",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\PDF",
            "OC\\Preview\\OpenDocument",
            "OC\\Preview\\Office",
            "OC\\Preview\\MSOffice2007",
            "OC\\Preview\\MSOffice2003",
            "OC\\Preview\\MSOfficeDoc",
            "OC\\Preview\\EMF",
            "OC\\Preview\\StarOffice",
            "OC\\Preview\\Illustrator",
            "OC\\Preview\\Photoshop",
            "OC\\Preview\\Postscript",
            "OC\\Preview\\Krita",
            "OC\\Preview\\Font",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\WebP",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\PNG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\SVG",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\TGA",
            "OC\\Preview\\SGI",
            "OC\\Preview\\Image",
            "OC\\Preview\\MP3"
        ],
        "maintenance": false,
        "maintenance_window_start": 6,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "read_timeout": 100
        },
        "memcached_options": {
            "14": 50,
            "15": 50,
            "19": 50,
            "20": 50,
            "8": 50,
            "-1001": true,
            "16": true,
            "18": true
        },
        "cache_chunk_gc_ttl": 86400,
        "sharing.enable_share_accept": true,
        "mysql.utf8mb4": true,
        "share_folder": "\/Share\/",
        "theme": "",
        "cipher": "AES-256-CTR",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "forwarded_for_headers": [
            "HTTP_X_FORWARDED",
            "HTTP_FORWARDED_FOR",
            "HTTP_X_FORWARDED_FOR",
            "HTTP_X_REAL_IP"
        ],
        "max_filesize_animated_gifs_public_sharing": 10,
        "filelocking.enabled": true,
        "filelocking.ttl": 7200,
        "filelocking.debug": false,
        "enable_file_metadata": true,
        "app_install_overwrite": {
            "0": "files_trackdownloads",
            "1": "epubreader",
            "2": "mindmap_app",
            "3": "pdfdraw",
            "4": "ocsms",
            "5": "occweb",
            "6": "files_markdown",
            "7": "impersonate",
            "8": "files_readmemd",
            "9": "duplicatefinder",
            "10": "apporder",
            "11": "breezedark",
            "12": "files_downloadactivity",
            "13": "carnet",
            "14": "workflow_media_converter",
            "15": "google_synchronization",
            "16": "libresign",
            "17": "messagevault",
            "18": "timetracker",
            "19": "weather",
            "20": "files_fulltextsearch_tesseract",
            "21": "files_texteditor",
            "23": "sharingpath",
            "24": "richdocuments",
            "25": "integration_moodle",
            "26": "health",
            "27": "ocdownloader",
            "28": "maps",
            "29": "facerecognition",
            "30": "cfg_share_links",
            "31": "files_mindmap"
        },
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "1025",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "memories.exiftool": "\/usr\/bin\/exiftool",
        "has_rebuilt_cache": true,
        "memories.vod.path": "\/var\/www\/nextcloud\/apps\/memories\/bin-ext\/go-vod-amd64",
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "activity_expire_days": 90,
        "debug": false,
        "allow_local_remote_servers": true,
        "memories.vod.disable": false,
        "memories.db.triggers.fcu": true,
        "memories.gis_type": 1,
        "memories.timeline.default_path": "_empty_",
        "memories.viewer.high_res_cond_default": "zoom",
        "memories.vod.vaapi": false,
        "memories.vod.vaapi.low_power": false,
        "memories.exiftool_no_local": true
    }
}
List of activated Apps
Enabled:
  - activity: 5.0.0-dev.0
  - admin_audit: 1.22.0
  - analytics: 6.0.2
  - announcementcenter: 7.2.2
  - app_api: 32.0.0
  - apporder: 0.15.0
  - audioplayer: 3.7.0
  - bruteforcesettings: 5.0.0-dev.0
  - calendar: 6.1.3
  - camerarawpreviews: 0.8.8
  - cfg_share_links: 7.0.1
  - checksum: 2.0.3
  - circles: 32.0.0
  - cloud_federation_api: 1.16.0
  - comments: 1.22.0
  - contacts: 8.1.2
  - contactsinteraction: 1.13.1
  - cookbook: 0.11.5
  - dashboard: 7.12.0
  - dav: 1.34.2
  - dav_push: 1.0.0
  - deck: 1.16.3
  - external: 7.0.0
  - facerecognition: 0.9.70
  - federatedfilesharing: 1.22.0
  - files: 2.4.0
  - files_automatedtagging: 3.0.2
  - files_downloadactivity: 1.18.1
  - files_downloadlimit: 5.0.0-dev.0
  - files_external: 1.24.0
  - files_fulltextsearch: 32.0.2
  - files_fulltextsearch_tesseract: 27.0.1
  - files_markdown: 2.4.1
  - files_mindmap: 0.0.33
  - files_pdfviewer: 5.0.0-dev.0
  - files_readmemd: 3.0.2
  - files_reminders: 1.5.0
  - files_sharing: 1.24.1
  - files_texteditor: 2.15.1
  - files_trashbin: 1.22.0
  - files_versions: 1.25.0
  - fileslibreofficeedit: 2.0.1
  - firstrunwizard: 5.0.0-dev.0
  - flow_notifications: 3.0.0
  - fulltextsearch: 32.0.0
  - fulltextsearch_elasticsearch: 32.0.1
  - group_default_quota: 0.1.13
  - group_everyone: 0.1.18
  - groupfolders: 20.1.6
  - groupquota: 0.2.3
  - guests: 4.6.0
  - health: 2.2.2
  - imageconverter: 2.1.0
  - impersonate: 3.0.0
  - integration_github: 3.2.2
  - integration_gitlab: 4.0.0
  - integration_google: 4.3.0
  - integration_mastodon: 4.0.0
  - integration_moodle: 1.0.2
  - logreader: 5.0.0-dev.0
  - lookup_server_connector: 1.20.0
  - maps: 1.6.0
  - memories: 7.7.0
  - messagevault: 1.0.3
  - metadata: 0.23.0
  - music: 2.5.1
  - news: 27.2.0
  - nextcloud_announcements: 4.0.0-dev.0
  - notes: 4.12.4
  - notifications: 5.0.0-dev.0
  - notify_push: 1.2.1
  - oauth2: 1.20.0
  - occweb: 0.2.3
  - onlyoffice: 9.12.0
  - password_policy: 4.0.0-dev.0
  - phonetrack: 0.9.1
  - photos: 5.0.0-dev.1
  - previewgenerator: 5.11.0
  - privacy: 4.0.0-dev.0
  - profile: 1.1.0
  - provisioning_api: 1.22.0
  - quota_warning: 1.22.0
  - recognize: 10.0.7
  - recommendations: 5.0.0-dev.0
  - related_resources: 3.0.0-dev.0
  - secrets: 2.1.4
  - serverinfo: 4.0.0-dev.0
  - settings: 1.15.1
  - sharingpath: 0.4.4
  - side_menu: 5.1.3
  - spreed: 22.0.7
  - suspicious_login: 10.0.0-dev.0
  - systemtags: 1.22.0
  - tables: 1.0.2
  - tasks: 0.17.1
  - text: 6.0.1
  - theming: 2.7.0
  - theming_customcss: 1.19.0
  - thesearchpage: 1.2.16
  - timemanager: 0.3.19
  - timetracker: 0.0.86
  - twofactor_admin: 4.9.0
  - twofactor_backupcodes: 1.21.0
  - twofactor_nextcloud_notification: 6.0.0-dev.0
  - twofactor_totp: 14.0.0
  - updatenotification: 1.22.0
  - uppush: 2.3.1
  - user_status: 1.12.0
  - user_usage_report: 3.0.0
  - viewer: 5.0.0-dev.0
  - weather_status: 1.12.0
  - webhook_listeners: 1.3.0
  - welcome: 1.4.0
  - workflow_media_converter: 1.15.1
  - workflow_ocr: 1.32.1
  - workflow_pdf_converter: 3.0.0
  - workflow_script: 3.0.0
  - workflowengine: 2.14.0
Disabled:
  - assistant: 2.12.0 (installed 2.12.0)
  - breezedark: 29.0.0 (installed 29.0.0)
  - carnet: 0.25.12 (installed 0.25.12)
  - collectives: 3.4.0 (installed 3.4.0)
  - cospend: 3.1.6 (installed 3.1.6)
  - drawio: 3.1.2 (installed 3.1.2)
  - duplicatefinder: 1.7.3 (installed 1.7.3)
  - electronicsignatures: 3.0.5 (installed 3.0.5)
  - encryption: 2.20.0 (installed 2.19.0)
  - end_to_end_encryption: 1.18.0 (installed 1.18.0)
  - epubreader: 1.4.7 (installed 1.4.7)
  - extract: 1.3.6 (installed 1.3.6)
  - federation: 1.22.0 (installed 1.17.0)
  - files_accesscontrol: 3.0.2 (installed 3.0.2)
  - files_antivirus: 6.1.0 (installed 6.1.0)
  - files_archive: 1.2.8 (installed 1.2.8)
  - files_scripts: 4.1.0 (installed 4.1.0)
  - files_trackdownloads: 1.11.0 (installed 1.11.0)
  - files_zip: 2.2.0 (installed 2.2.0)
  - flowupload: 1.1.3 (installed 1.1.3)
  - forms: 5.2.3 (installed 5.2.3)
  - google_synchronization: 4.1.0 (installed 4.1.0)
  - integration_openai: 3.9.1 (installed 3.9.1)
  - integration_reddit: 2.1.1 (installed 2.1.1)
  - integration_twitter: 1.0.7 (installed 1.0.7)
  - libresign: 12.1.0 (installed 12.1.0)
  - mediadc: 0.4.0 (installed 0.4.0)
  - money: 0.31.0 (installed 0.31.0)
  - ncdownloader: 1.0.23 (installed 1.0.23)
  - ocdownloader: 1.9.1 (installed 1.9.1)
  - ocsms: 2.2.0 (installed 2.2.0)
  - officeonline: 3.1.1 (installed 3.1.1)
  - pride_flags: 1.1.2 (installed 1.1.2)
  - profiler: 1.6.0 (installed 1.6.0)
  - ransomware_protection: 1.14.0 (installed 1.14.0)
  - richdocuments: 9.0.2 (installed 9.0.2)
  - riotchat: 0.20.0 (installed 0.20.0)
  - root_cache_cleaner: 0.1.9 (installed 0.1.9)
  - sharebymail: 1.22.0 (installed 1.17.0)
  - socialsharing_email: 4.0.1 (installed 4.0.1)
  - storj: 0.0.9 (installed 0.0.9)
  - support: 4.0.0-dev.0 (installed 1.10.0)
  - survey_client: 4.0.0-dev.0 (installed 1.15.0)
  - twofactor_gateway: 2.0.0 (installed 2.0.0)
  - unsplash: 3.1.0 (installed 3.1.0)
  - user_ldap: 1.23.0 (installed 1.17.0)
  - video_converter: 1.0.6 (installed 1.0.6)
  - weather: 1.7.7 (installed 1.7.7)
  - webhooks: 0.4.3 (installed 0.4.3)
Nextcloud Signing status
Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- files_mindmap
	- EXCEPTION
		- OC\IntegrityCheck\Exceptions\InvalidSignatureException
		- Certificate is not valid.

Raw output
==========
Array
(
    [files_mindmap] => Array
        (
            [EXCEPTION] => Array
                (
                    [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
                    [message] => Certificate is not valid.
                )

        )

)
Nextcloud Logs

Additional info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the dashboard's upcoming-events display with the supplied vCard, using a non-UTC user and contact timezone, then compare it with the Calendar app's result. Trace the dashboard, Contacts, and Calendar event paths to identify where the birthday timezone is interpreted; done means the displayed countdown uses the contact timezone or the user's timezone when none is set.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend, localization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.