sporf
September 23, 2024, 3:28am
1
All of my recordings (playback motion events, etc.) are timestamped +5 hours ahead of their correct time. My time zone is GMT - 5 so it looks like all dates are being presented as GMT instead of local time.
In playback, I can’t see videos from “today” if they happen after 7PM because they’re time stamped as tomorrow - it seems the filter is in my local time zone but the videos are time stamped in GMT. I have to go to “this week” to see all the videos from today.
Check the date.timezone setting in your php.ini files.
Can you give me the output of
php --ini | grep "Loaded Configuration File"
grep -r "date.timezone" /etc/php/8.2/fpm/php.ini
I’m pretty sure that is the correct path for grep, if not change it to what the return if php --ini says
sporf
September 23, 2024, 5:37pm
4
$ php --ini | grep Loaded
Loaded Configuration File: /etc/php/8.3/cli/php.ini
then changed
;date.timezone =
to
date.timezone = "America/Chicago"
and restarted bluecherry. I’ll see if it’s better.
Make sure to restart php-fpm so the configuration can be updated
sudo systemctl restart php8.3-fpm
So, I just realized php --ini shows the command line php version, not the FPM version.
Change the timezone in /run/php/php8.2-fpm.sock (for 24.04, 22.04 is a different path).
THEN restart php8.3-fpm
sporf
September 29, 2024, 3:07pm
7
I don’t think that’s the right path, there’s nothing in php7.4-fpm.sock and no 8.3 files in /run/php/.
I did find and edit /etc/php/7.4/fpm/php.ini then restart php7.4-fpm which fixed the playback times.
$ pwd
/run/php
$ ls -l
total 4
-rw-r--r-- 1 root root 4 Sep 24 12:58 php7.4-fpm.pid
srw-rw---- 1 www-data www-data 0 Sep 24 12:58 php7.4-fpm.sock
lrwxrwxrwx 1 root root 30 Sep 24 12:58 php-fpm.sock -> /etc/alternatives/php-fpm.sock
$ ls -l /etc/alternatives/php-fpm.sock
lrwxrwxrwx 1 root root 24 Sep 24 12:58 /etc/alternatives/php-fpm.sock -> /run/php/php7.4-fpm.sock
$ sudo cat php7.4-fpm.sock
cat: php7.4-fpm.sock: No such device or address
@sporf THANK YOU
I was having this same issue with a fresh install of 3.1.3 on debian 12
vi etc/php/8.2/fpm/php.ini
then changed
;date.timezone =
to
date.timezone = "America/Chicago
rebooted.
success.