Files with creating date within daylight savings time have wrong time

I have found several posts regarding time zone problems with Nextcloud, but none of them exactly match what I’m finding.

Nextcloud 20.0.4
Apache 2.4.38
Debian 10
My server clock is set to UTC and my timezone is set to my local time. I have verified that my OS time shows properly.

When I upload files to Nextcloud, if they were created WITHIN DST (i.e. their creation date is between DST (daylight savings time) start and end) then their time is 1 hour in the future. If their create date falls outside of DST then their time is proper.

I have verified by taking two old files from my Windows and logging into Nextcloud and uploading them. When I look within Nextcloud at their date modified, the file created within DST shows the wrong time. This is also refelcted if I access the files via WebDAV.

This is a screen shot of my files in Windows:
WindowsFiles

These are scree shows from Nextcloud where I have selected to view the file details of each of the two files. I have put the screen shots together into one file.

To be clear, this does not have to do with when the files with UPLOADED to Nextcloud. It has to do with their original dates they were created, wherever that was.

This presents a big problem when I am using WebDAV and utilities to sync folders based on file date/time.

I have the same problem if I use external storage - when viewing file details within next cloud that reside on external storage their time is off (ahead) by 1 hour if the file was created during DST dates.

Also, when I am running these tests, we are NOT in DST (it is January).

Is there a configuration I need to change?

Thank you.

you to understand, you mean when the file in June was created, it was DST in you place and now it shows the time without DST? So in central europe, you file from June was created at 9.22 am UTC (10.22 am local time with DST, and now it shows 11.22 without DST)?

Yes, what you are saying is correct. I don’t know if it will show a different time when we switch to DST.

The file was not created on Nextcloud. It was created somewhere else. I had it in a folder in Windows and I uploaded it to Nextcloud this week and now the time shown in Nextcloud does not match the time shown in Windows. I similar file that was created in December and uploaded from Windows to Nextcloud shows the same time in both systems.

To be honest, I never paid attention to this detail and I couldn’t say how it is handled in other systems. From a calendar I would expect that it always shows the local date of the time it was (so if I had a meeting at 10 am in summer, I don’t want that the same shows now at 11 am). So that all dates relate if it was during DST or not.

For the interface this is probably something for the bug tracker (github.com/nextcloud/server/issues) and it has to be in the code. For webdav clients, I don’t know if they push a date in UTC and if it is up to the used OS to show the date.

I’m surprised now one else has noticed this over the years (Nextcloud is not a new product!) so that’s why I’m wondering if it is some setting on my end. But I have a fairly vanilla install, I believe.

This is a problem whether the files are uploaded to Nextcloud or stored in a folder connected via external storage. For example, my ultimate use case is that I have files stored on my NAS (a separate box) and I have external storage set up to point to this folder, I then access the external stroage via a Windows “NET USE” mapping command to use (https:///remote.php/dav/files//) . If I also map a network drive directly via Windows sharing to the same NAS folder then essentially both shares are looking at the exact same files, but the ones shared through Nextcloud DAV have the wrong time for files creating during the “summer” (DST).

(Essentially, I am using Nextcloud as a WebDAV server in this case).

Am I supposed to log this into the incident tracket at github or is this something you do? If I need to do it, please let me know, and I will.

Can anyone else reproduce this behavior that I’m seeing? Is there another more appropriate place that I should be asking?

Thank you!

  • Bob

The more I look into this, I feel it is not necessarily a Nextcloud issue. I logged into the Debian OS and looked at the files within the storage folder and they have the same issue. I also mounted a CIFS share to my NAS and the files also exhibit this issue.

This is from my local Debian folder where nextcloud stores the files:

The CIFS mount point looks the same.

There must be some other settings in Debian. I did set my timezone, but something is still odd.

Thanks for your help.

I found this, which pretty much describes the issues. This is what happens when you try to access the same file using different operating systems that utilize different ways of handling file date/time.

http://www.pascal-hacker.de/info/it/sw/dst.htm