selfoss icon indicating copy to clipboard operation
selfoss copied to clipboard

Show the times in local time zone

Open jtojnar opened this issue 5 years ago • 2 comments

Currently, the web client shows times in wrong timezone:

Server time zone Europe/Prague
Client time zone Europe/Prague
Date in feed Mon, 16 Jul 2018 00:00:00 +0200
Date in SQLite database 2018-07-15 22:00:00
Displayed in web client 7/15/2018, 10:00:00 PM

jtojnar avatar Jul 17 '18 14:07 jtojnar

Is the datetime attribute of the entry <div> right? I cannot reproduce that problem. However, I've noticed that the Date in my SQLite database is not UTC but local. Maybe this problem comes from the fact that sqlite does not store timezone and that the update script runs in a UTC environment whereas the server and client run in a UTC+0200 environment.

niol avatar Aug 03 '18 15:08 niol

Hmm, you are right. I was actually setting the timezone in php-fpm config but not in the CLI’s and PHP does not really respect system timezone setting since 5.4.

We might actually want to switch to UTC and leave the time rendering to the client. Adding TZ=UTC to defaults.ini should work.

jtojnar avatar Aug 14 '18 14:08 jtojnar