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

Activity time is offset by 2 hours #4414

Open
julianjakobs opened this issue Aug 5, 2022 · 0 comments
Open

Activity time is offset by 2 hours #4414

julianjakobs opened this issue Aug 5, 2022 · 0 comments

Comments

@julianjakobs
Copy link

julianjakobs commented Aug 5, 2022

Expected Behavior

Activities should show as "xx minutes ago"

Current Behavior

Any edit is shown as "2 hours ago"

Screenshots (if appropriate):

Screenshot from 2022-08-05 10-06-09

Possible Solution

Possibly setting correct timezone before Restya installation as noted in #3274
However, that would require a complete wipe of the system.

Steps to Reproduce (for bugs)

Install Restya with while wrong timezone is set (UTC in our case).
Set correct timezone with timedatectl (Europe/Berlin)
Every activity shows as 2 hours ago.

Your Environment

Ubuntu 22.04, installed Restya with the install script. Seemingly had wrong timezone (UTC) set at installation time.

I noted that the install script also sets the timezone into the php.ini at installation, so i changed it there too.
PostgreSQL also seems to have an own timezone for the database that is set at installation time, so i changed that too.
System and User timezone in Restya are both set to Europe/Berlin.
Issue persists.

$ cat /etc/php/7.4/fpm/php.ini | grep date.timezone
; http://php.net/;date.timezone
;;date.timezone =
date.timezone = Europe/Berlin

$ timedatectl 
               Local time: Fri 2022-08-05 09:50:58 CEST
           Universal time: Fri 2022-08-05 07:50:58 UTC 
                 RTC time: Fri 2022-08-05 07:50:59     
                Time zone: Europe/Berlin (CEST, +0200) 
System clock synchronized: yes                         
              NTP service: active                      
          RTC in local TZ: no


postgres=# select NOW();
              now              
-------------------------------
 2022-08-05 09:51:25.066679+02
(1 row)

postgres=# show timezone;
   TimeZone    
---------------
 Europe/Berlin
(1 row)

postgres=# \c restyaboard
psql (14.4 (Ubuntu 14.4-1.pgdg20.04+1), server 12.11 (Ubuntu 12.11-1.pgdg20.04+1))
You are now connected to database "restyaboard" as user "postgres".
restyaboard=# SELECT value FROM settings WHERE name = 'SITE_TIMEZONE';
     value     
---------------
 Europe/Berlin
(1 row)

restyaboard=# SELECT timezone FROM users WHERE username = 'jakobs';
   timezone    
---------------
 Europe/Berlin
(1 row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant