Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show the times in local time zone #1046

Open
jtojnar opened this issue Jul 17, 2018 · 2 comments
Open

Show the times in local time zone #1046

jtojnar opened this issue Jul 17, 2018 · 2 comments

Comments

@jtojnar
Copy link
Member

jtojnar commented Jul 17, 2018

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
@niol
Copy link
Collaborator

niol commented Aug 3, 2018

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.

@jtojnar
Copy link
Member Author

jtojnar commented Aug 14, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants