Hi,
All videos are saved with the correct local time (UTC+2.00), also the inserted time in the snapshot pictures show the correct local time, but in the events list start/end-time show UTC time.
Where/how do I set that the local times are displayed?
(
ZM-options TIMEZONE is set to "(GMT+02:00) Europe, Madrid"; MySQL timezone is set the same
as said, ZM obviously knows the local time as it inserts the correct local time into snapshot images
I think it must be a display setting have I missed
)
Can you hint me in the right direction?
Thanks!
How to show local time (instead of UTC) in events-list?
- danielmalaga
- Posts: 15
- Joined: Sun Nov 07, 2021 12:09 pm
- Location: Málaga, Spain
- Contact:
Re: How to show local time (instead of UTC) in events-list?
Best way to fix this is to add the timezone to php.ini
This example is for Debian 12
Add timezone to PHP (This may not be necessary but does not hurt and will allow the time of events to be displayed correctly)
nano /etc/php/8.2/apache2/php.ini
Search for [Date] (Ctrl + w then type Date and press Enter) and make changes as follows for your time zone
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/New_York
Ctrl+o Enter to save
CTRL+x to exit
Restart Apache
service apache2 restart
This example is for Debian 12
Add timezone to PHP (This may not be necessary but does not hurt and will allow the time of events to be displayed correctly)
nano /etc/php/8.2/apache2/php.ini
Search for [Date] (Ctrl + w then type Date and press Enter) and make changes as follows for your time zone
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/New_York
Ctrl+o Enter to save
CTRL+x to exit
Restart Apache
service apache2 restart
- danielmalaga
- Posts: 15
- Joined: Sun Nov 07, 2021 12:09 pm
- Location: Málaga, Spain
- Contact:
Re: How to show local time (instead of UTC) in events-list?
SOLVED.
Thank you very much, bbunge!
Changing date.timezone in php.ini did the trick. Times are now displayed in my local time.
Thank you very much, bbunge!
Changing date.timezone in php.ini did the trick. Times are now displayed in my local time.
-
- Posts: 1336
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: How to show local time (instead of UTC) in events-list?
Curious -
Did you not get a prompt at (initial) setup time to set Options->System->TIMEZONE?
Did you not get a prompt at (initial) setup time to set Options->System->TIMEZONE?
- danielmalaga
- Posts: 15
- Joined: Sun Nov 07, 2021 12:09 pm
- Location: Málaga, Spain
- Contact:
Re: How to show local time (instead of UTC) in events-list?
I am not sure if there was a prompt or if I set it up according to my old setup on my last install on another machine.
Anyway, Options->System->TIMEZONE is/was set correct, and this was not the problem. The problem was that in php.ini date.timezone was set to 'UTC' instead of 'Europe/Madrid' (in my case)
Anyway, Options->System->TIMEZONE is/was set correct, and this was not the problem. The problem was that in php.ini date.timezone was set to 'UTC' instead of 'Europe/Madrid' (in my case)
-
- Posts: 1336
- Joined: Sat Aug 31, 2019 7:35 am
- Location: San Diego
Re: How to show local time (instead of UTC) in events-list?
Interesting.
Thanks.
Thanks.
Re: How to show local time (instead of UTC) in events-list?
Thank you, it worked for me too (currently using Zoneminder 1.36.35 under Debian 12-bookworm as well).
For those who - like me - might miss the final lines of the solution message, don't forget to restart apache2 for the change to take effect, for example like this:
For those who - like me - might miss the final lines of the solution message, don't forget to restart apache2 for the change to take effect, for example like this:
Code: Select all
sudo systemctl restart apache2