Nextcloud server timestamp is in the future

Hello,

I’m running Nextcloud 10 on a Raspberry PI3 using Nginx & PHP7 (Debian Jessie).
All my files are stored on External Storage (Synology NAS) via SMB/CIFS.

And all’s working fine but I find out today that Nextcloud is in the future…(I know this is marketting, but I did not expect that to be real :slight_smile: )

The PI and the NAS are configured to use GMT+1 with summer time and both of them are ok. (I mean synced and the time is right), but Nextcloud itself time is GMT + 4.
For example in the log I’ve something like 2016-09-05T23:00:03+02:00, but 23:00:03 is already GMT+2 (GMT+1 + summer time).
And I do not know where the +02:00 came from.

This is not only log dependant but also impact files timestamp as I’ve got a lot of sync issue with the Desktop client because after a first sync to the server, the file on the server is then in the future…and every local change before a 2 hours delay result in conflict.

The only thing I’ve configured is in the Config\config.php (except the time of the PI itself):
‘logtimezone’ => ‘Europe/Paris’,

If someone has any idea what I should be looking for, it would be nice.

Thanks for your time and idea.

EDIT:
If I create a text file using the web interface, it’s created at the right time.
It is sync to a client with the proper time.
Now if I change the file on the client, it is uploaded in the server with a +2h timestamp (so in the futur).

2 Likes

To avoid any confusion, I run all my servers on GMT. The timezone in the NC interface is set by the user preferences (detected from his Browser).

You can run your server in your specific timezone. Do you use ntp to sync your time automatically (highly recommended)? date gives you the current date in the default timezone of your system. You have perhaps set one system to your local time and your system thinks it is UTC (=GMT), or European summer time?

Hi,

I’ve check, both NAS and PI are configured to use the same timezone, which is also the same configuration as the desktop client.

I’ve the same installation at my parents place (PI, NAS, Desktop Client) with the same installation and configuration (Being lazy I’ve duplicated things, except for security and certificate)…and I do have the same issue

Yes that’s the notation. It should read as 23:00:03 local time which is GMT+2, GMT would be 21:00:03! You see the same thing in e-mails:

Received: from origin.example.org ([www.xxx.yyy.zzz])
	by destination.example.org
	for mail@example.org; Tue, 06 Sep 2016 09:26:17 +0000
Received: from o2.origin.example.org ([www.xxx.yyy.zzz])
	by private.example.org
	formail@example.org; Tue,  6 Sep 2016 11:26:13 +0200 (CEST)

There are just 4s of difference. You can read it like 11:26:13=(GMT+2)=(CEST)

Yes I do agree for that (was little bit tired yesterday night). This is the expected format.

But file that are sent by Desktop client, let’s say created at XX:00:00 are time stamped in Nextcloud at XX+2 :00:00.

I’ll try to set up my PI and my NAS to use GMT and check if it changes something or not.

Meantime if someone’s has another idea…

Uh Uh
Ok, seems that setting back the PI to UTC (with a nginx start & stop) as time zone solved the issue…

But it also start a full re-sync from server to Desktop client…but only for one out of 4 shares.

I’ll let this working until the end of week and check if this is stable.

Hi

After a little bit more than 24h with system working without previous sync issue, I think that this all’s fine again.

Thanks for the tips @tflidd !