External Storage (FTP), files uploaded show timestamp 1 hour into the future

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 27.1.3
Operating system and version (eg, Ubuntu 20.04): 22.04.3
Apache or nginx version (eg, Apache 2.4.25): NGinx
PHP version (eg, 7.4): 8.2

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. install vsftpd on ubuntu and configure it to your needs
  2. set no different ports than 21/22
  3. connect FTP storage as external to nextcloud
  4. make a scan2ftp from Epson printer with scan to network / cloud support
  5. actualize your ftp storage destination folders in nextcloud (webui)
  6. see that the timestamp of the latest files is shown as “in one hour” ??

The output of your Nextcloud log in Admin > Logging:

hwclock in terminal of the nextcloud and ftp server shows
real time (UTC+1 Europe/Berlin) -> winter time
2023-11-12 13:06:11.994654+01:00

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

>   'htaccess.RewriteBase' => '/',
>   'logtimezone' => 'Europe/Berlin',
>   'default_phone_region' => 'DE',

The output of your Apache/nginx/system log in /var/log/____:

no entries or errors or hints

````Vorformatierter Text`

My vsftpd.conf has the following parameters set

If enabled, vsftpd will display directory listings with the time
in your local time zone. The default is to display GMT. The
times returned by the MDTM FTP command are also affected by this

The files on the server show the real system time

the files in nextcloud webui shows the following instead

when i copy the file from the ftp_storage folder to another dir of the same user e.g. /tmp
then i get the right timestamp

The ftp folder is part of each users homedir on the ubuntu (nextcloud) server.
My printer has templates for each allowed ftp user to send the scanned files via network to the ftp server root dir.
My nextcloud is configured to use the same ftp root as e.g. “Scan2Nextcloud” directory and make the scanned files accessible in the webui / nextcloud client.

Server time (date or hwclock) show real local time!
Printer setup is set up with same time (ntp sync with pool.ntp.org)
Nextcloud has set the correct timezone by config.php (Europe/Berlin)

but never the less i get wrong timestamps after uploading files by scan2ftp?

I found this (older) github post


but those posts are made long before NC 27.1.3 and the FTP.php file is slightly different in line 358ff so i will not made any stupid tests with old code stuff.

Is there anyone outside who has ideas what game my brain is playing here - i have no ideas how to get rid of these false timestamps.
Thanks for “braining” me :grinning:

That could be the reason:

nextcloud expects UTC time and when you change it with this key and your timezone is CET ((UTC + 1), the result is, that the server interpretes it as one hour in the future :wink:

Much luck,

1 Like

Thanks ernolf,

yes i commented out this option in vsftpd.conf and the file timestamp now says “recently …” (created file)

I never the less am a little bit confused that many pages concerning vsftpd configuration say that the localtime option is nescessary to get system time (timestamps) for uploaded ftp files??

OK all examples i have read were not concerned in combination to nextcloud, so thanks again for your help!

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.