Contacts: Birthday, Date of Death, Anniversary fields are date-time fields, but should only be date fields

Created on 25 Dec 2018  路  9Comments  路  Source: nextcloud/contacts

Describe the bug

When entering / modifying a date in a Birthday, Date of Death, Anniversary the resulting date is displayed/saved as date-time instead of only date. IMHO the time component is irrelevant and makes it harder to read.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a contact
  2. Click on "Choose property type" of "Add new property"
  3. Select Birthday, Date of Death or Anniversary
  4. Pre-filled value is the current date-time

Expected behavior
The value should only be date.

Actual behavior
The value is date-time

Screenshots
initial

Server configuration

Operating system: Linux

Web server: Nginx

Database: PostgreSQL

PHP version: 7.0.33-0+deb9u1

Nextcloud version: 15.0.0

Contacts version: 3.0.1

Updated from an older Nextcloud or fresh install: Update

Signing status:

No errors have been found.

List of activated apps:

Enabled:
  - bruteforcesettings: 1.3.0
  - calendar: 1.6.4
  - cloud_federation_api: 0.1.0
  - contacts: 3.0.1
  - dav: 1.8.0
  - federatedfilesharing: 1.5.0
  - files: 1.10.0
  - files_sharing: 1.7.0
  - files_texteditor: 2.7.0
  - files_trashbin: 1.5.0
  - files_videoplayer: 1.4.0
  - gallery: 18.2.0
  - gpxedit: 0.0.10
  - gpxpod: 3.0.0
  - impersonate: 1.2.0
  - logreader: 2.0.0
  - lookup_server_connector: 1.3.0
  - metadata: 0.8.0
  - nextcloud_announcements: 1.4.0
  - notifications: 2.3.0
  - oauth2: 1.3.0
  - provisioning_api: 1.5.0
  - richdocuments: 3.1.0
  - serverinfo: 1.5.0
  - sharebymail: 1.5.0
  - tasks: 0.9.8
  - twofactor_backupcodes: 1.4.1
  - updatenotification: 1.5.0
  - user_ldap: 1.5.0
  - workflowengine: 1.5.0
Disabled:
  - accessibility
  - activity
  - admin_audit
  - comments
  - encryption
  - federation
  - files_external
  - files_pdfviewer
  - files_versions
  - firstrunwizard
  - password_policy
  - support
  - survey_client
  - systemtags
  - theming
  - user_external
{
    "system": {
        "appstore.experimental.enabled": false,
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 4,
        "logtimezone": "UTC",
        "maintenance": false,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trashbin_retention_obligation": "7, 14",
        "trusted_domains": [
             "***REMOVED SENSITIVE VALUE***",
             "***REMOVED SENSITIVE VALUE***"
        ],
        "version": "15.0.0.10",
        "theme": "",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "dbtype": "pgsql",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "5432",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": 587,
        "mail_smtpsecure": "tls",
        "mail_smtpauth": true,
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG"
        ],
        "overwrite.cli.url":  "***REMOVED SENSITIVE VALUE***"
    }
}

Client configuration

Browser:
Friefox 64
Chromium 71.0.3578.80

Operating system:
Linux

CardDAV-clients:

Logs

Web server error log

No error in the log

Nextcloud log

data/nextcloud.log

No entry for Debug/Info/Warning/Error/Fatal

Browser log

Browser Log/Console is empty
1. to develop enhancement

Most helpful comment

To be honest: The time this is part of the spec, but no contacts app provides input options for the time. We shouldn鈥檛 either, and just show the date, not the time.

And yes, in the year picker there could simply be a "No year" option in the list of years, maybe always after the current year. ("Omit year" (1 m only) could be a bit long for translations.)

Examples (swiped from image search)

iOS contacts

Google Contacts

Facebook

All 9 comments

GitMate.io thinks possibly related issues are https://github.com/nextcloud/contacts/issues/794 (Birthday, Date of Death, Anniversary save wrong date), https://github.com/nextcloud/contacts/issues/687 (Date fields are not localized), https://github.com/nextcloud/contacts/issues/278 (The date fields are not working), https://github.com/nextcloud/contacts/issues/501 (Contact could not be saved if both anniversary and birthday), and https://github.com/nextcloud/contacts/issues/781 (Can not add "Date of Death" to contacts).

Duplicate of #796

@skjnldsv: This bug should be re-opened as it is not a duplicate of #796: date of birth and date of death should be date and not date time. this is still the case, even after update to 3.0.2.

@devlux actually BDAY can be date and/or time
https://tools.ietf.org/html/rfc6350#section-6.2.5

6.2.5.  BDAY

   Purpose:  To specify the birth date of the object the vCard
      represents.

   Value type:  The default is a single date-and-or-time value.  It can
      also be reset to a single text value.

   Cardinality:  *1

   ABNF:

     BDAY-param = BDAY-param-date / BDAY-param-text
     BDAY-value = date-and-or-time / text
       ; Value and parameter MUST match.

     BDAY-param-date = "VALUE=date-and-or-time"
     BDAY-param-text = "VALUE=text" / language-param

     BDAY-param =/ altid-param / calscale-param / any-param
       ; calscale-param can only be present when BDAY-value is
       ; date-and-or-time and actually contains a date or date-time.

   Examples:

             BDAY:19960415
             BDAY:--0415
             BDAY;19531015T231000Z
             BDAY;VALUE=text:circa 1800

@skjnldsv thank you for the explanation, which of course makes sense :-) is it possible to tell the datetime picker to only store date when editing? I've tried to remove the time but was not successfull...

That's actually why I reopened the issue :)
I have no idea how we could do that properly. Do you have a suggestion?
The issue also happens with the ommit year option (#625). How should we add that in the UI without looking terrible? @jancborchardt any idea?

To be honest: The time this is part of the spec, but no contacts app provides input options for the time. We shouldn鈥檛 either, and just show the date, not the time.

And yes, in the year picker there could simply be a "No year" option in the list of years, maybe always after the current year. ("Omit year" (1 m only) could be a bit long for translations.)

Examples (swiped from image search)

iOS contacts

Google Contacts

Facebook

I am also interested in this feature.

Fixed for the incoming version

Was this page helpful?
0 / 5 - 0 ratings