nextcloud / deck

🗂 Kanban-style project & personal management tool for Nextcloud, similar to Trello
https://apps.nextcloud.com/apps/deck
GNU Affero General Public License v3.0
1.22k stars 277 forks source link

Card Due Date/Time saved incorrectly. #2276

Open trev-dev opened 4 years ago

trev-dev commented 4 years ago

Describe the bug When I enter a card due date/time and save it, then go away and come back, the due time is incorrect. The time ends up being saved incorrectly by a factor of 7 hours. I live in a Pacific Standard timezone, so to me, it seems like Deck is saving the time in UTC and doesn't seem to care about where I live.

To Reproduce Steps to reproduce the behavior:

  1. Make a Deck/Card
  2. Set a due date/time
  3. Navigate away from that deck and navigate back
  4. Observe the due date/time for that card again.

Expected behavior I expect to set the date/time and have it save the way I set it, instead of it being several hours out of sync.

Client details:

Server details **Operating system**: Raspbian Buster (Debian 10) **Web server:** Apache **Database:** MySQL **PHP version:** 7.3 **Nextcloud version:** 19.0.2 **Running in Docker** **Where did you install Nextcloud from:** https://ownyourbits.com/nextcloudpi/ **Signing status:**✔️ ``` Login as admin user into your Nextcloud and access http://example.com/index.php/settings/integrity/failed paste the results here. ``` No errors have been found. **List of activated apps:** ``` If you have access to your command line run e.g.: sudo -u www-data php occ app:list from within your Nextcloud installation folder ``` - accessibility: 1.5.0 - activity: 2.12.0 - audioplayer: 2.11.2 - bookmarks: 3.3.4 - bruteforcesettings: 2.0.1 - calendar: 2.0.4 - cloud_federation_api: 1.2.0 - comments: 1.9.0 - contacts: 3.3.0 - contactsinteraction: 1.0.0 - cookbook: 0.7.6 - dav: 1.15.0 - deck: 1.0.5 - encryption: 2.7.0 - federatedfilesharing: 1.9.0 - federation: 1.9.0 - files: 1.14.0 - files_markdown: 2.3.0 - files_pdfviewer: 1.8.0 - files_rightclick: 0.16.0 - files_sharing: 1.11.0 - files_trashbin: 1.9.0 - files_versions: 1.12.0 - files_videoplayer: 1.8.0 - firstrunwizard: 2.8.0 - forms: 2.0.4 - logreader: 2.4.0 - lookup_server_connector: 1.7.0 - maps: 0.1.6 - news: 14.2.2 - nextcloud_announcements: 1.8.0 - nextcloudpi: 0.0.1 - notes: 3.6.4 - notifications: 2.7.0 - oauth2: 1.7.0 - password_policy: 1.9.1 - photos: 1.1.0 - polls: 1.4.3 - privacy: 1.3.0 - provisioning_api: 1.9.0 - recommendations: 0.7.0 - serverinfo: 1.9.0 - settings: 1.1.0 - sharebymail: 1.9.0 - side_menu: 1.10.0 - social: 0.3.1 - spreed: 9.0.3 - support: 1.2.1 - survey_client: 1.7.0 - systemtags: 1.9.0 - tasks: 0.13.3 - text: 3.0.1 - theming: 1.10.0 - twofactor_backupcodes: 1.8.0 - twofactor_email: 1.0.1 - twofactor_totp: 5.0.0 - updatenotification: 1.9.0 - viewer: 1.3.0 - workflowengine: 2.1.0 **Nextcloud configuration:** ``` If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your Nextcloud installation folder or Insert your config.php content here Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …) ``` ```json { "system": { "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": { "0": "localhost", "11": "184.66.8.116", "1": "172.18.0.3", "5": "nextcloudpi.local", "7": "nextcloudpi", "8": "nextcloudpi.lan", "6": "192.168.0.227", "4": "cloud.trevdev.ca", "20": "cloud.trevdev.ca", "12": "cloud.trevdev.ca" }, "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "19.0.2.2", "overwrite.cli.url": "https:\/\/cloud.trevdev.ca\/", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "instanceid": "***REMOVED SENSITIVE VALUE***", "memcache.local": "\\OC\\Memcache\\Redis", "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0, "timeout": 0, "password": "***REMOVED SENSITIVE VALUE***" }, "tempdirectory": "\/var\/www\/nextcloud\/data\/tmp", "mail_smtpmode": "smtp", "mail_smtpauthtype": "LOGIN", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "preview_max_x": "2048", "preview_max_y": "2048", "jpeg_quality": "60", "overwriteprotocol": "https", "maintenance": false, "loglevel": 2, "htaccess.RewriteBase": "\/", "mail_sendmailmode": "smtp", "twofactor_enforced": "false", "twofactor_enforced_groups": [ "tfa" ], "twofactor_enforced_excluded_groups": [], "mail_smtpauth": 1, "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "465", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "theme": "", "app_install_overwrite": [ "twofactor_email", "previewgenerator" ], "mail_smtpsecure": "ssl" } } ``` **Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/...
Logs #### Nextcloud log (data/nextcloud.log) ``` Insert your Nextcloud log here ``` [nextcloud.log](https://github.com/nextcloud/deck/files/5189867/nextcloud.log) #### Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ``` Console: ``` 10:14:07.382 jQuery is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. main.js:1:1361801 10:14:07.712 Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). pagewrap.bundle.js:1:1151 10:14:07.712 Content Security Policy: The page’s settings blocked the loading of a resource at eval (“script-src”). 10:14:09.263 JQMIGRATE: Migrate is installed, version 1.4.1 jquery-migrate.min.js:2:551 10:14:09.310 $ is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 2 globals.js:61:15 10:14:09.345 Handlebars is deprecated: please ship your own, this will be removed in Nextcloud 20 globals.js:61:15 10:14:09.368 $ is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 3 globals.js:61:15 10:14:09.369 Notifications permissions granted App.vue:290 10:14:09.383 XHRGEThttps://cloud.trevdev.ca/ocs/v2.php/apps/notifications/api/v2/notifications [HTTP/2 200 OK 578ms] 10:14:09.388 jQuery is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. globals.js:61:15 10:14:09.391 $ is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. globals.js:61:15 10:14:09.635 New search handler registered search.js:67:12 10:14:09.699 XHRGEThttps://cloud.trevdev.ca/apps/deck/boards [HTTP/2 200 OK 413ms] 10:14:09.701 XHRGEThttps://cloud.trevdev.ca/apps/deck/config [HTTP/2 200 OK 660ms] 10:14:09.705 XHRGEThttps://cloud.trevdev.ca/ocs/v2.php/cloud/groups [HTTP/2 200 OK 556ms] 10:14:09.707 XHRGEThttps://cloud.trevdev.ca/apps/deck/boards/4 [HTTP/2 200 OK 755ms] 10:14:09.908 jQuery is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 7 globals.js:61:15 10:14:09.913 $ is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. globals.js:61:15 10:14:09.943 session heartbeat polling started session-heartbeat.js:97:9 10:14:09.953 $ is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 3 globals.js:61:15 10:14:09.955 jQuery is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 8 globals.js:61:15 10:14:09.983 $ is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. globals.js:61:15 10:14:09.985 jQuery is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 8 globals.js:61:15 10:14:10.006 Content Security Policy: The page’s settings blocked the loading of a resource at eval (“script-src”). 10:14:10.042 jQuery is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 12 globals.js:61:15 10:14:10.048 $ is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. globals.js:61:15 10:14:10.071 XHRGEThttps://cloud.trevdev.ca/apps/encryption/ajax/getStatus [HTTP/2 200 OK 469ms] 10:14:10.107 jQuery is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 114 globals.js:61:15 10:14:11.571 XHRGEThttps://cloud.trevdev.ca/apps/deck/stacks/4 [HTTP/2 200 OK 251ms] 10:14:11.965 jQuery is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 8 globals.js:61:15 10:14:14.695 jQuery is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 97 globals.js:61:15 10:14:16.740 XHRGEThttps://cloud.trevdev.ca/apps/deck/cards/11/attachments [HTTP/2 200 OK 187ms] 10:14:16.743 XHRGEThttps://cloud.trevdev.ca/ocs/v2.php/apps/deck/api/v1.0/cards/11/comments?limit=10&offset=0 [HTTP/2 200 OK 506ms] 10:14:16.745 XHRGEThttps://cloud.trevdev.ca/ocs/v2.php/collaboration/resources/deck-card/11?format=json [HTTP/2 200 OK 669ms] 10:14:16.879 jQuery is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 229 globals.js:61:15 10:14:22.366 This site appears to use a scroll-linked positioning effect. This may not work well with asynchronous panning; see https://developer.mozilla.org/docs/Mozilla/Performance/ScrollLinkedEffects for further details and to join the discussion on related tools and features! deck 10:14:22.369 jQuery is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. 143 globals.js:61:15 10:14:29.514 XHRPUThttps://cloud.trevdev.ca/apps/deck/cards/11 [HTTP/2 200 OK 246ms] 10:14:30.460 jQuery is deprecated: The global jQuery is deprecated. It will be updated to v2.4 in Nextcloud 20 and v3.x in Nextcloud 21. In later versions of Nextcloud it might be removed completely. Please ship your own. ```
trev-dev commented 4 years ago

I entered "12pm" and JS sent over duedate: "2020-09-30T19:00:05.000Z" Which is 7pm, but if this is supposed to be UTC 0 and adjusted on the front end after the fact, it's the correct date to send over. I don't know which end is breaking, basically. The clock on my profile is correct.

juliusknorr commented 4 years ago

Hm strange, i cannot reproduce this hereYes, times should be stored in UTC. Could you check if the response coming from the server is also the UTC time and what is stored in your database in the oc_deck_cards table?

trev-dev commented 4 years ago

Tried again, the response duedate is 2020-09-30T19:00:05+00:00 - which looks like UTC with no offset?

When I access mysql inside my container, I can retrieve the following row:

MariaDB [nextcloud]> SELECT * from `oc_deck_cards` WHERE `title`="Update Expired Contracts";
+----+--------------------------+-------------+------------------+----------+-------+---------------+-------------+------------+---------+-------+----------+---------------------+----------+------------+
| id | title                    | description | description_prev | stack_id | type  | last_modified | last_editor | created_at | owner   | order | archived | duedate             | notified | deleted_at |
+----+--------------------------+-------------+------------------+----------+-------+---------------+-------------+------------+---------+-------+----------+---------------------+----------+------------+
| 30 | Update Expired Contracts |             | NULL             |       21 | plain |    1599723849 | NULL        | 1594852178 | trevdev |   999 |        0 | 2020-09-30 19:00:05 |        1 |          0 |
+----+--------------------------+-------------+------------------+----------+-------+---------------+-------------+------------+---------+-------+----------+---------------------+----------+------------+

It looks like UTC time to me.

juliusknorr commented 4 years ago

Ok now the question would be why your local timezone is not applied in the frontend then, because for me with UTC+2 it works just fine. I'll check the code to see if we might miss somethig there.

trev-dev commented 4 years ago

Thank you! If there's more information or access I can provide, let me know. I very much want Deck to succeed.

juliusknorr commented 4 years ago

Could you open your browsers javascript console and run the following there?

OC.getLocale()
moment('2020-09-30T19:00:05+00:00', 'LLL', OC.getLocale()).toDate()
trev-dev commented 4 years ago

Sure thing:

22:55:32.218 OC.getLocale()
22:55:32.251 "en"
[...]
22:56:03.540 moment('2020-09-30T19:00:05+00:00', 'LLL', OC.getLocale()).toDate()
22:56:03.582 moment is deprecated: please ship your own, this will be removed in Nextcloud 20 globals.js:61:15
22:56:03.591
Invalid Date
juliusknorr commented 4 years ago

Ouch, indeed we use moment there not how it is supposed to be. the 3rd parameter should actually be a boolean, though even stranger that it seems to be interpreted as false with de_DE as a locale.

Anyhow, fix is in https://github.com/nextcloud/deck/pull/2282

trev-dev commented 4 years ago

Glorious! Thank you!

juliusknorr commented 4 years ago

Thanks a lot for your help with debugging this :)

trev-dev commented 4 years ago

Hey There! The release of 1.1.0 and seeing my decks in the Calendar is amazing. Thank you for this!

However, the issue with the time being 7 hours off for me is still occurring. Do you require the same data?

trev-dev commented 4 years ago

Just an FYI, the time saves incorrectly with the Android app as well. It's not just the web UI. All the same symptoms apply. It looks good at first, then I navigate away/back to the same cards, and the time is 7 hours forward.

Edit: And yet Deck is the only app that does this. All others save/display time fine.

juliusknorr commented 3 years ago

So I tried to reproduce this again now with a vm that has a different timezone set (UTC-4) and my local browser (UTC+1) both happen to send the correct UTC time to the server when updating the due date and also the server returns proper UTC and it is interpreted correctly on both browsers according to their timezone.

Could you maybe in addition check how your webserver time is configured, with the timedatectl command and check which timezone is set in PHP (there should be a date.timezone value configured somewhere in /etc/php`)

@stefan-niedermann Since you wanted to investigate this on the android side as well, could you reproduce any issue with this?

trev-dev commented 3 years ago

Hey @juliushaertl this is where stuff gets weird. I checked my original issue and I can see that I did not mention that we're running in an instance of docker-compose which up until now I was not sure would be part of the issue or not. I am specifically running an instance of https://hub.docker.com/r/ownyourbits/nextcloudpi

timedatectl is working on the host machine and this is its output:

               Local time: Fri 2020-11-20 11:52:46 PST
           Universal time: Fri 2020-11-20 19:52:46 UTC
                 RTC time: n/a
                Time zone: America/Vancouver (PST, -0800)
System clock synchronized: yes
              NTP service: inactive
          RTC in local TZ: no

NTP service: inactive is a bit of a lie as I do have ntp.service enabled/started in systemd. The time looks correct. Of course timedatectl does not work inside the container.

If I run docker-compose exec nextcloudpi bash and traverse the /etc/php directories I eventually find /etc/php/7.3/cli/php.ini where date.timezone is commented out. I also find it in /etc/php/7.3/fpm/php.ini where it's commented out there as well.

If it is helpful to know my docker-compose set up, here it is:

version: '3.7'
services:
  nextcloudpi:
    image: ownyourbits/nextcloudpi
    command: "192.168.x.xxx"
    ports:
     - "80:80"
     - "443:443"
     - "4443:4443"
    volumes:
     - type: bind
       source: /path/to/data
       target: /data
     - /etc/localtime:/etc/localtime:ro
    container_name: nextcloudpi
    restart: unless-stopped
  coturn:
    image: coturn_talk
    build: ./coturn-docker
    restart: unless-stopped
    volumes:
      - /etc/localtime:/etc/localtime:ro
    environment:
      - KILL_FREQUENCY="0 13 * * 6"
    ports:
      - 3478:3478

Note that I am passing the host's time configuration onto nextcloudpi's container.

How would you like me to proceed?

juliusknorr commented 3 years ago

Hm, i think /etc/localtime is not picked up by PHP so maybe you can check if you can add a dedicated php config file like timezone.ini and mount it to some path where it will be picked up by php. Something like this should work for the volume mounting:

➜ nextcloudpi cat docker-compose.yml
version: '3.7'
services:
  nextcloudpi:
    image: ownyourbits/nextcloudpi-x86
    ports:
     - "8991:80"
     - "8992:443"
     - "8993:4443"
    volumes:
     - /etc/localtime:/etc/localtime:ro
     - ./timezone.ini:/etc/php/7.3/fpm/conf.d/99-timezone.ini
    container_name: nextcloudpi
    restart: unless-stopped
➜ nextcloudpi cat timezone.ini                                                    
date.timezone = Europe/Berlin # change to your timezone
trev-dev commented 3 years ago

It looks like I was able to mount 99-timezone.ini successfully from a host .ini file

root@fe210d5c45c7:/etc/php/7.3/fpm/conf.d# ls 
10-mysqlnd.ini   20-curl.ini      20-iconv.ini      20-phar.ini       20-sysvmsg.ini    20-zip.ini
10-opcache.ini   20-dom.ini       20-igbinary.ini   20-posix.ini      20-sysvsem.ini    90-ncp.ini
10-pdo.ini       20-exif.ini      20-intl.ini       20-readline.ini   20-sysvshm.ini    99-timezone.ini
15-xml.ini       20-fileinfo.ini  20-json.ini       20-redis.ini      20-tokenizer.ini
20-bcmath.ini    20-ftp.ini       20-ldap.ini       20-shmop.ini      20-wddx.ini
20-bz2.ini       20-gd.ini        20-mbstring.ini   20-simplexml.ini  20-xmlreader.ini
20-calendar.ini  20-gettext.ini   20-mysqli.ini     20-smbclient.ini  20-xmlwriter.ini
20-ctype.ini     20-gmp.ini       20-pdo_mysql.ini  20-sockets.ini    20-xsl.ini
root@fe210d5c45c7:/etc/php/7.3/fpm/conf.d# cat 99-timezone.ini 
[PHP]
date.timezone = "US/Vancouver"
root@fe210d5c45c7:/etc/php/7.3/fpm/conf.d# 

However, the time is still not saved correctly. As I am not seeing any time issues with any of the other nextcloud apps (calendar, especially), it really makes me wonder what we're missing in deck.

juliusknorr commented 3 years ago

However, the time is still not saved correctly. As I am not seeing any time issues with any of the other nextcloud apps (calendar, especially), it really makes me wonder what we're missing in deck.

Same here, this is really puzzling me. I could reproduce a 1 hour offset after saving a duedate and reloading the page with the nextcloudpi docker image with an unset date.timezone but for me this was fixed after properly configuring that and restarting the container. I'll see if I can do some more investigations with the container then.

Maybe you can with the latest release and the timezone set as above try to collect the following:

juliusknorr commented 3 years ago

Results from my test setup for later:

I think there is something wrong with the parsing we do to handle datetime columns between different database setups. https://github.com/nextcloud/server/pull/20184 could help to get rid of that since the mapper doesn't support them out of the box right now.

To be continued... :sleeping:

trev-dev commented 3 years ago

The latest version I can get for NextcloudPi without going into testing is 19.0.4. Here is the data you have requested:

Card Due Date Chosen: Nov 30, 11:00 hours Due Date Displayed: Nov 30, 19:00 hours

PUT https://cloud.site.com/apps/deck/cards/30

{"title":"Update Expired Contracts","description":"","stackId":21,"type":"plain","lastModified":1606243536,"lastEditor":null,"createdAt":1594852178,"labels":[],"assignedUsers":[],"attachments":null,"attachmentCount":0,"owner":{"primaryKey":"trevdev","uid":"trevdev","displayname":"Trev","type":0},"order":999,"archived":false,"duedate":"2020-11-30T19:00:05.000Z","deletedAt":0,"commentsUnread":0,"id":30,"ETag":"21e32a8221540d6fb15fcb9c342b7543","overdue":0}

PUT (response)

{"title":"Update Expired Contracts","description":"","stackId":21,"type":"plain","lastModified":1606250638,"lastEditor":"trevdev","createdAt":1594852178,"labels":[],"assignedUsers":null,"attachments":null,"attachmentCount":null,"owner":{"primaryKey":"trevdev","uid":"trevdev","displayname":"Trev","type":0},"order":999,"archived":false,"duedate":"2020-11-30T19:00:05+00:00","deletedAt":0,"commentsUnread":0,"id":30,"ETag":"3474ce65ed6fe2cee5acdd1c80a92275","overdue":0}

SQL Data:

MariaDB [nextcloud]> SELECT * from `oc_deck_cards` WHERE `id`=30 LIMIT 1;
+----+--------------------------+-------------+------------------+----------+-------+---------------+-------------+------------+---------+-------+----------+---------------------+----------+------------+
| id | title                    | description | description_prev | stack_id | type  | last_modified | last_editor | created_at | owner   | order | archived | duedate             | notified | deleted_at |
+----+--------------------------+-------------+------------------+----------+-------+---------------+-------------+------------+---------+-------+----------+---------------------+----------+------------+
| 30 | Update Expired Contracts |             | NULL             |       21 | plain |    1606250638 | NULL        | 1594852178 | trevdev |   999 |        0 | 2020-11-30 19:00:05 |        0 |          0 |
+----+--------------------------+-------------+------------------+----------+-------+---------------+-------------+------------+---------+-------+----------+---------------------+----------+------------+

When I load the page I see the API call to /apps/deck/stacks/5, which has this response payload:

[{"title":"Waiting","boardId":5,"deletedAt":0,"lastModified":1594851471,"order":0,"id":14,"ETag":"902187309bd4eaf45b64a639b79bdefb"},{"title":"Ready","boardId":5,"deletedAt":0,"lastModified":1606250638,"cards":[{"title":"Update Expired Contracts","description":"","stackId":21,"type":"plain","lastModified":1606250638,"lastEditor":null,"createdAt":1594852178,"labels":[],"assignedUsers":[],"attachments":null,"attachmentCount":0,"owner":{"primaryKey":"trevdev","uid":"trevdev","displayname":"Trev","type":0},"order":999,"archived":false,"duedate":"2020-11-30T19:00:05-08:00","deletedAt":0,"commentsUnread":0,"id":30,"ETag":"3474ce65ed6fe2cee5acdd1c80a92275","overdue":0}],"order":1,"id":21,"ETag":"3474ce65ed6fe2cee5acdd1c80a92275"},{"title":"In Progress","boardId":5,"deletedAt":0,"lastModified":1601745076,"order":2,"id":15,"ETag":"abb33046efc5e524395af0e80802b27d"},{"title":"Complete","boardId":5,"deletedAt":0,"lastModified":1597693773,"cards":[{"title":"Update Billables","description":"","stackId":16,"type":"plain","lastModified":1597693769,"lastEditor":null,"createdAt":1594849464,"labels":[],"assignedUsers":[],"attachments":null,"attachmentCount":0,"owner":{"primaryKey":"trevdev","uid":"trevdev","displayname":"Trev","type":0},"order":0,"archived":false,"duedate":null,"deletedAt":0,"commentsUnread":0,"id":23,"ETag":"e37458a58e6f1be04e13224f7c2636a4","overdue":0},{"title":"Decide on whether or not to keep teaching","description":"","stackId":16,"type":"plain","lastModified":1597693773,"lastEditor":null,"createdAt":1594854488,"labels":[],"assignedUsers":[],"attachments":null,"attachmentCount":0,"owner":{"primaryKey":"trevdev","uid":"trevdev","displayname":"Trev","type":0},"order":1,"archived":false,"duedate":null,"deletedAt":0,"commentsUnread":0,"id":40,"ETag":"b53ced40b9e327071742e222ac18d08d","overdue":0},{"title":"Migrate to Deck","description":"","stackId":16,"type":"plain","lastModified":1597693769,"lastEditor":null,"createdAt":1594852008,"labels":[],"assignedUsers":[],"attachments":null,"attachmentCount":0,"owner":{"primaryKey":"trevdev","uid":"trevdev","displayname":"Trev","type":0},"order":2,"archived":false,"duedate":null,"deletedAt":0,"commentsUnread":0,"id":27,"ETag":"e37458a58e6f1be04e13224f7c2636a4","overdue":0}],"order":3,"id":16,"ETag":"b53ced40b9e327071742e222ac18d08d"}]

I'm sure this has been challenging. Thanks for sticking with me here.

Discostu36 commented 3 years ago

Interesting, for me, the problem is not quite like described by @trev-dev . Due dates are shown correctly for me in front end. But notifications are off. So, if or example my due date is 12:00 CEST, the notification will alert at 12:00 UTC.

accountForIssues commented 3 years ago

I have the same issue as @Discostu36.

My timezone is UTC +2. When UTC is 8 AM then local time would be 10 AM. So;

Should I create another issue ?

magikmw commented 3 years ago

I observed the same behaviour as @Discostu36 and @accountForIssues.

Additional information I can offer is that mobile notifications are also off, which is the biggest issue for me.

accountForIssues commented 3 years ago

@magikmw Deck uses the built-in notification system of the Nextcloud server so you should get notifications via Nextcloud client on mobile and not via Deck app. However, the F-droid versions of Nextcloud DO NOT support push notifications due to dependency on proprietary Google services.

If you are self-hosting Nextcloud and have admin access, you can try a user made project. It consists of a server and an android app. I've been testing it for a couple of weeks and I get instant notifications.

magikmw commented 3 years ago

@magikmw Deck uses the built-in notification system of the Nextcloud server so you should get notifications via Nextcloud [...]

Sorry, what I meant is that the timing of notifications is off. I get them just fine, only 2h earlier (due to my UTC+2 time zone I assume).

trev-dev commented 3 years ago

I'm honestly at a loss on this issue. I've tried various help channels and most people just toss their arms up and say their installation of Deck works fine. I'm at a point now where I want to tear down my docker instance and install directly on the bare metal and see if that makes any difference. Will touch base after.

paeddi commented 3 years ago

I'm honestly at a loss on this issue. I've tried various help channels and most people just toss their arms up and say their installation of Deck works fine. I'm at a point now where I want to tear down my docker instance and install directly on the bare metal and see if that makes any difference. Will touch base after.

Have you made any progress? I don't have the problem in docker, but on a raspi with nextcloudpi.

accountForIssues commented 3 years ago

Just to test, I reset the time zones (i.e., changed to UTC) of all docker containers associated with Nextcloud and the notifications have fired at the right time since then.

mstyp commented 3 years ago

Having the exact same issue as @accountForIssues and several others. Went through the same debug steps @accountForIssues described, everything the same. Notifications send at the wrong time.

A big difference / problem I am having is that I am not using docker, its installed my laptop which acts as a local server, so I cant just switch the timezone of the machine, despite that fixing the notifications issue (although oddly enough not the widget issue described below). this is unfortunately not a viable solution, as I also use that laptop for other things and need it to have the right timezone.

TBH I don't think this is just a deck issue. My calendar has always sent notifications for the calendar at the at the wrong time as well, and the upcoming events widget in the dashboard is currently saying that there are no more events today, despite there being some upcoming events in a few hours.

There is some bug somewhere with nextcloud that is screwing with time zones and its getting really frustrating.