Nextcloud Deck notifications sent 2 hours too early

Nextcloud version: 27.0.2
Operating system and version: NixOS 23.05
Linux: 6.1.50 x86_64
nginx: 1.24.0
PHP version: 8.2

Hi All,

I have moved my Nextcloud install from an Ubuntu server to a NixOS server and now my Nextcloud Deck notifications are sent 2 hours early.
My Timezone is CEST (UTC+2). So for example when I set a due date in Nextcloud Deck to 20:00h it is sent at 18:00h. It doesn’t matter whether I create the event on Nextcloud Web or in the Nextcloud Deck Android App, so I think it’s a server issue.

This issue probably applies to the other Nextcloud apps as well, but I don’t use those.

I’m pretty sure it’s a timezone issue because the 2 hour difference between UTC and UTC+2 matches my problem, I presume it’s some service having to do with Nextcloud cron that’s running in UTC or something…

Thus far I have tried setting the date.timezone setting in the phpfpm (using php_admin_value in the pool config) and phpcli .ini files to no avail. The timezone on my server is correct and time is ntp synced.

Is this the first time you’ve seen this error? (Y/N): It has been this way since I installed Nextcloud on the new server.

Steps to replicate it:

  1. Create a card in Nextcloud Deck
  2. Set the due date
  3. Notification is sent to all clients exactly 2 hours too early (or, if the event is less than 2 hours away, immediately). The due date/time shows correctly in the “in X hours” text on the Deck card.

The output of your Nextcloud log in Admin > Logging:
I have already looked through the log and on loglevel DEBUG I can see the background cron jobs being executed but there’s really nothing relevant or more detailed in there regarding this issue.

config.php

<?php
$CONFIG = array (
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/lib/nextcloud/nix-apps',
      'url' => '/nix-apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/lib/nextcloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    2 =>
    array (
      'path' => '/var/lib/nextcloud/store-apps',
      'url' => '/store-apps',
      'writable' => true,
    ),
  ),
  'appstoreenabled' => false,
  'datadirectory' => '/var/lib/nextcloud/data',
  'skeletondirectory' => '',
  'log_type' => 'file',
  'loglevel' => 2,
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbuser' => 'nextcloud',
  'dbpassword' => removed,
  'dbtype' => 'mysql',
  'trusted_proxies' =>
  array (
  ),
  'profile.enabled' => false,
  'passwordsalt' => removed,
  'secret' => removed,
  'version' => '27.0.2.1',
  'overwrite.cli.url' => 'http://localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'installed' => true,
  'instanceid' => removed,
  'overwriteprotocol' => 'https',
  'maintenance' => false,
  'mysql.utf8mb4' => true,
  'data-fingerprint' => removed,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => '/run/redis-nextcloud/redis.sock',
    'port' => 0,
  ),
  'default_phone_region' => 'de',
  'mail_sendmailmode' => 'pipe',
  'mail_smtpmode' => 'sendmail',
  'logdateformat' => 'F d, Y H:i:s',
  'logfile' => 'nextcloud.log',
  'mail_from_address' => removed,
  'mail_domain' => removed,
  'trashbin_retention_obligation' => '14,28',
  'default_locale' => 'en_DE',
);

The output of your Apache/nginx/system log: not relevant


Maybe someone has had this issue before or knows other config options I could try?

Any help/ideas are appreciated! : )

Did you set the correct timezone in your Nextcloud useraccount, too?

Do you mean locale? Because I don’t know of a user-specific timezone setting.

Maybe in the personal settings in the browser:

As far as I remember well, the timezone setting was asked at first login in a browser session.

My availability timezone is already set to Europe/Berlin, but I wasn’t asked to select a timezone during my first login, probably because I moved over the database from my old Nextcloud instance. But aside from this I don’t think there’s actually a per-user timezone setting. BTW my Nextcloud Calender tiemzone is set to Europe/Berlin too.

Now that Germany is in winter time, my notifications are only 1 hour early instead of 2, confirming that this is definitely some sort of timezone issue…

apparently you are on UTC… check all available locales… even those on your server.